Bug 9524 – Unittest ddocs fail to appear following ditto

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-16T21:17:00Z
Last change time
2013-08-18T21:41:28Z
Assigned to
nobody
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2013-02-16T21:17:44Z
With latest git HEAD: --------------------snip-------------------- /// A strange struct struct S(int d) { int[d] x; /// A truly strange function. auto func(A)(A a) if (is(typeof(A) : S)) { return S!(d+1)(); } /// ditto auto func(A)(A a) if (!is(typeof(A) : S)) { return S!(1)(); } /// Example unittest { // This example fails to appear in the doc. int y = 123; } } void main() { } --------------------snip-------------------- HTML output: --------------------snip-------------------- <html><head> <META http-equiv="content-type" content="text/html; charset=utf-8"> <title>test</title> </head><body> <h1>test</h1> <!-- Generated by Ddoc from test.d --> <br><br> <dl><dt><big><a name="S"></a>struct <u>S</u>(int d); </big></dt> <dd>A strange struct<br><br> <dl><dt><big><a name="func"></a>auto <u>func</u>(A)(A <i>a</i>); <br><a name="func"></a>auto <u>func</u>(A)(A <i>a</i>); </big></dt> <dd>A truly strange function.<br><br> </dd> </dl> </dd> </dl> <hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small> </body></html> --------------------snip-------------------- Note that the unittest code fails to appear in the docs.
Comment #1 by hsteoh — 2013-02-16T21:19:16Z
P.S. If the unittest is moved _before_ the ditto, then it works.
Comment #2 by hsteoh — 2013-08-18T21:41:28Z
Looks like this has been fixed. Tested on git HEAD (1a6da16ef112e03607574758b722698f2950b0de).