Comment #0 by snarwin+bugzilla — 2020-11-16T21:07:44Z
Example program:
---
/// My cool struct
struct S(T)
{
version (none) {} else
/// My cool method
void method() {}
}
---
As of DMD 2.094.0, the DDoc output of this program (compiled with `dmd -c -D`) contains documentation for S, but not for method.
Comment #1 by nick — 2022-10-09T16:57:27Z
Just a note that changing `none` to `all` still doesn't show `method`.
Comment #2 by snarwin+bugzilla — 2022-10-09T17:25:40Z
I think it's expected (or at least accepted as a known limitation) that DDoc will skip declarations that are excluded from compilation by `version` blocks. The bug here is specifically that it skips a declaration that is *included* in the compilation.
(Note the `else` at the end of the line with the `version` condition.)
Comment #3 by robert.schadek — 2024-12-13T19:12:52Z