[Issue 294] New: DDoc: Function templates get double and incomplete documentation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 17 05:45:41 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=294

           Summary: DDoc: Function templates get double and incomplete
                    documentation
           Product: D
           Version: 0.164
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: ddoc
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: oskar.linde at gmail.com


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) {}
}


-- 




More information about the Digitalmars-d-bugs mailing list