Bug 12097 – Ddoc unittest should generate consistent result with 'ditto' declarations
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-07T02:51:00Z
Last change time
2014-02-07T07:31:54Z
Keywords
ddoc, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-02-07T02:51:15Z
This example code:
/// declaration
struct S
{
/// method
void foo() {}
}
/// ddoc code
unittest
{
int a = 1;
}
Will generate following doc:
struct S;
declaration
Examples:
ddoc code
int a = 1;
void foo();
method
====
However, if you add a 'ditto' declaration immediately after 'S':
/// declaration
struct S
{
/// method
void foo() {}
}
/// ditto
void f() {}
/// ddoc code
unittest
{
int a = 1;
}
In generated ddoc, 'Examples' section will be moved after the members of S.
struct S;
void f();
declaration
void foo();
method
Examples: <--- Moved after S.foo
ddoc code
int a = 1;
It should be:
struct S;
void f();
declaration
Examples:
ddoc code
int a = 1;
void foo();
method