Bug 3829 – ddoc of mixed in functions

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-02-18T12:44:00Z
Last change time
2015-06-09T01:27:38Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-02-18T12:44:53Z
This code: /// this is a ddoc comment void foo(int i) { printf("%d\n", i); } /// ditto void foo(uint i) { printf("%d\n", i); } /// ditto void foo(short i) { printf("%d\n", i); } Generates this correct HTML documentation: void foo(int i); void foo(uint i); void foo(short i); this is a ddoc comment Then I have tried to generate those similar functions with a mixin(), but then I can't find a way to make ddoc list them (into the generated Html) grouped: /// this is a ddoc comment void foo(int i) { printf("int) %d\n", i); } template Gen(string type) { const Gen = ` /// ditto void foo(` ~ type ~ ` i) { printf("` ~ type ~ `) %d\n", i); }`; } /// ditto mixin(Gen!("uint")); /// ditto mixin(Gen!("short")); void main() { foo(10); foo(cast(uint)20); foo(cast(short)30); }
Comment #1 by aifgi90 — 2010-02-18T13:54:33Z
Comment #2 by bearophile_hugs — 2010-02-18T14:57:05Z
(In reply to comment #1) > See: http://d.puremagic.com/issues/show_bug.cgi?id=2420 Yes, thank you, this seems a dupe.
Comment #3 by braddr — 2010-02-18T21:28:20Z
If you find dupes, please mark them as such.. generally preferring to mark the newest one as a dup of the oldest one. *** This issue has been marked as a duplicate of issue 2420 ***