Bug 294 – DDoc: Function templates get double and incomplete documentation

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-08-17T07:45:00Z
Last change time
2014-02-15T13:20:09Z
Keywords
ddoc
Assigned to
bugzilla
Creator
oskar.linde

Comments

Comment #0 by oskar.linde — 2006-08-17T07:45:39Z
Issue 273 was closed with DMD 0.164 and DDoc output is now generated for function templates. Unfortunately the output is far from optimal. 0.164 also started giving wrong documentation for template functions not using the short hand notation. /** This basic case doesn't work very well. The template signature is * documented twice, but the function signature (argument names and return * type) is not documented at all. This comment is also repeated twice. */ int func1(T)(T x) {} /** This comment is also repeated twice, and the second function signature is * not very well documented. */ int func2(T,U)(T x, U y) {} /// ditto int func2(T)(T x) {} /// template func3(T,U) { /** This used to work adequately and documented both func3 templates * simultaneously. Now, it documents the first template twice and * no longer documents the function argument and return types.*/ int func3(T x, U y) {} } /// ditto template func3(T) { int func3(T x) {} }
Comment #1 by bugzilla — 2008-02-16T00:43:03Z
This appears to work correctly in 2.011.
Comment #2 by matti.niemenmaa+dbugzilla — 2008-02-16T07:04:32Z
No comment appears for func3 with 1.026. The types are correct, though, and func1 and func2 seem to work. And 2.011 isn't out yet (although the changelog incorrectly claims it is...), so you can't really mark this WORKSFORME with that. :-)
Comment #3 by larsivar — 2008-02-16T07:31:23Z
And since this was reported for 0.164 which must be considered part of the 1.x branch, fixing it in 2.011 is not good enough to close this.
Comment #4 by bugzilla — 2008-07-09T22:32:07Z
Fixed dmd 1.032 and 2.016