Thread overview
[Issue 2609] New: No documentation generated for destructor
Jan 24, 2009
d-bugmail
Jan 24, 2009
d-bugmail
Mar 12, 2010
Don
Mar 29, 2010
Walter Bright
Mar 29, 2010
Don
Apr 10, 2010
Don
January 24, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2609

           Summary: No documentation generated for destructor
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: andrei@metalanguage.com


No documentation is generated for destructors:

/// Yah
struct S
{
    /// Nah
    ~this() {}
}

Yah appears, Nah doesn't.


-- 

January 24, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2609





------- Comment #1 from andrei@metalanguage.com  2009-01-23 20:29 -------
I also add that documentation is not generated for copy constructors, i.e.
this(this).


-- 

March 12, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2609


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-03-12 14:06:54 PST ---
This is a bit bizarre. In doc.c, around line 450, there's a lot of empty functions:


void Dsymbol::emitComment(Scope *sc)           { }
void InvariantDeclaration::emitComment(Scope *sc)  { }
#if DMDV2
void PostBlitDeclaration::emitComment(Scope *sc)   { }
#endif
void DtorDeclaration::emitComment(Scope *sc)       { }
void StaticCtorDeclaration::emitComment(Scope *sc) { }
void StaticDtorDeclaration::emitComment(Scope *sc) { }
void ClassInfoDeclaration::emitComment(Scope *sc)  { }
void ModuleInfoDeclaration::emitComment(Scope *sc) { }
void TypeInfoDeclaration::emitComment(Scope *sc)   { }

I believe that all of these should be deleted. Deleting PostBlit and Dtor certainly fixes the bugs in this report. FuncDeclaration::emitComment() seems to handle them just fine.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2609


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           Severity|normal                      |enhancement


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2010-03-29 11:38:07 PDT ---
The documentation for those functions should not be part of their interface presented to the user. That's why doc isn't generated for them.

It was a deliberate choice, not a bug. I'll mark it as an enhancement request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2609



--- Comment #4 from Don <clugdbug@yahoo.com.au> 2010-03-29 13:08:33 PDT ---
(In reply to comment #3)
> The documentation for those functions should not be part of their interface presented to the user. That's why doc isn't generated for them.
> 
> It was a deliberate choice, not a bug. I'll mark it as an enhancement request.

I think that's a reasonable decision, but the spec should state that doc isn't generated for them.

Eg, after:

If there is no documentation comment for a declaration, that declaration may
not appear in the output. To ensure it does appear in the output, put an empty
declaration comment for it.
+ Declarations which are not an explicit part of the interface do not have
documentation generated for them. These include:
+ invariant
+ postblit
+ destructor
+ static constructors and destructors
+ class info, type info, and module info

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2609


Don <clugdbug@yahoo.com.au> changed:

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


--- Comment #5 from Don <clugdbug@yahoo.com.au> 2010-04-09 19:10:22 PDT ---
Fixed DMD1.058 and DMD2.043.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------