www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 294] New: DDoc: Function templates get double and incomplete documentation

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: oskar.linde 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) {}
}


-- 
Aug 17 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=294


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Comment #1 from bugzilla digitalmars.com  2008-02-16 00:43 -------
This appears to work correctly in 2.011.


-- 
Feb 15 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=294


matti.niemenmaa+dbugzilla iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




------- Comment #2 from matti.niemenmaa+dbugzilla iki.fi  2008-02-16 07:04
-------
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. :-)


-- 
Feb 16 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=294





------- Comment #3 from larsivar igesund.net  2008-02-16 07:31 -------
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.


-- 
Feb 16 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=294


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




------- Comment #4 from bugzilla digitalmars.com  2008-07-09 22:32 -------
Fixed dmd 1.032 and 2.016


-- 
Jul 09 2008