294 – DDoc: Function templates get double and incomplete documentation

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 294 - DDoc: Function templates get double and incomplete documentation
Summary: DDoc: Function templates get double and incomplete documentation
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ddoc
Depends on:
Blocks:
Reported: 2006年08月17日 07:45 UTC by Oskar Linde
Modified: 2014年02月15日 13:20 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Oskar Linde 2006年08月17日 07:45:39 UTC
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 Walter Bright 2008年02月16日 00:43:03 UTC
This appears to work correctly in 2.011.
Comment 2 Matti Niemenmaa 2008年02月16日 07:04:32 UTC
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 Lars Ivar Igesund 2008年02月16日 07:31:23 UTC
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 Walter Bright 2008年07月09日 22:32:07 UTC
Fixed dmd 1.032 and 2.016


AltStyle によって変換されたページ (->オリジナル) /