[Issue 11337] Ddoc ignores methods in static else block

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 24 03:48:32 PDT 2013


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #2 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-10-24 03:48:30 PDT ---
If anything, I would say that the fact that Coin2 shows both is the problem
rather than the fact that Coin1 shows only one. In neither case can both exist,
and normally, ddoc only shows the code that gets compiled in (e.g. versioned
out code will not show up in the generated documentation). Normally, when you
get something weird like this, you use version(D_Ddoc) blocks to make the
documentation show what you want, but it's not particularly correct for it to
blindly throw everything for all of the various static if branches into the
documentation. The result wouldn't look anything like the actual class.

I think that it's getting a bit weird here because while the compiler normally
doesn't show stuff in the documentation that isn't compiled in, it tries to
show templated stuff even if it's not compiled in. And because it's then
generating documentation for a template which isn't associated with a
particular instantiation, it doesn't actually know what is and isn't supposed
to be compiled in. If those static ifs were outside of a template, then only
the branches which were true would end up with the documentation being
generated for them. So, the template just makes things weird. It also makes it
much harder to even know what the correct thing to do with the documentation
is, because what the documentation should look like could depend on the
template arguments (as is the case here).

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


More information about the Digitalmars-d-bugs mailing list