Bug 9789 – Ddoc for aliases should use new "alias x=y" syntax
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-22T18:40:00Z
Last change time
2013-03-22T19:58:00Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
hsteoh
Comments
Comment #0 by hsteoh — 2013-03-22T18:40:55Z
Code:
===================
import std.stdio;
struct S {}
///
alias X = S;
void main() { }
===================
Compile with dmd -D, the docs look something like this:
===================
test
alias S X;
blah blah blah
--------------------------------------------------------------------------
Page generated by [1]Ddoc.
===================
The old (confusing) alias syntax is used instead of the new, better "alias X=S" syntax.
Comment #1 by hsteoh — 2013-03-22T18:43:02Z
Oops, pasted the wrong code, the code should read:
===================
import std.stdio;
struct S {}
/// blah blah blah
alias X = S;
void main() { }
===================
Comment #2 by hsteoh — 2013-03-22T18:43:37Z
The HTML is:
<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="X"></a>alias S <u>X</u>;
</big></dt>
<dd>blah blah blah<br><br>
</dd>
</dl>
<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
</body></html>
Comment #3 by andrej.mitrovich — 2013-03-22T19:08:16Z