Bug 194 – DDoc: method-attributes ignored within templated class

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-06-14T02:33:19Z
Last change time
2019-05-23T08:29:30Z
Keywords
ddoc
Assigned to
No Owner
Creator
Kris

Comments

Comment #0 by someidiot — 2006-06-14T02:33:19Z
DDoc usually respects method attributes with a class, ensuring that private methods are not emitted, abstract methods are noted as such, and so on. This does not happen within a templated class: all methods are emitted regardless, and keywords such as abstract, protected, private, etc are all supressed from the output. Marked as 'major' because the generated doc is simply invalid.
Comment #1 by bugzilla — 2008-06-17T03:01:23Z
I agree this is a bug. This is not an excuse, but an explanation: By the time Ddoc runs, class members have been semantically analyzed, and so Ddoc knows what attributes go with the class members. For class templates, however, they don't get analyzed until they are instantiated, so when Ddoc looks at it the attributes have not been computed yet. That's why they're absent.
Comment #2 by andrej.mitrovich — 2012-11-02T02:11:35Z
*** Issue 2516 has been marked as a duplicate of this issue. ***
Comment #3 by andrej.mitrovich — 2012-11-02T02:11:51Z
*** Issue 3445 has been marked as a duplicate of this issue. ***
Comment #4 by andrej.mitrovich — 2012-12-18T12:02:07Z
*** Issue 5324 has been marked as a duplicate of this issue. ***
Comment #5 by razvan.nitu1305 — 2019-05-16T08:40:26Z
Does this bug manifest in D2 or can we close this?
Comment #6 by razvan.nitu1305 — 2019-05-23T08:29:30Z
I cannot reproduce this on git HEAD ubuntu 16.04. Closing as WORKFSFORME.