Bug 3711 – Ddoc does not generate nothing if std.stdio is imported

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-01-15T23:30:00Z
Last change time
2015-06-09T01:27:14Z
Assigned to
nobody
Creator
curoles

Comments

Comment #0 by curoles — 2010-01-15T23:30:52Z
Steps to Reproduce: Create file ddoc_bug1.d: 1 /// comment out the line below to see this 2.039 2 import std.stdio; 3 void main(){} call dmd -D ddoc_bug1.d Result: "body" is empty in the generated html file. <html><head> ... <h1>ddoc_bug1</h1> <!-- Generated by Ddoc from ddoc_bug1.d --> <br><br> <hr><small>Page generated by <a ...
Comment #1 by curoles — 2010-01-16T01:46:27Z
Ok. I see what happend: "Documentation comments not associated with a declaration are ignored". Seems that comments can't be associated with ImportDeclaration. If it is a feature, then it is kind of confusing one, because if there is no ModuleDeclaration then all comments preceding ImportDeclaration disapper, instead of being applied to the entire module.