[Issue 10587] New: __traits(getAttributes) doesn't work on incomplete templated types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 9 11:38:30 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10587
Summary: __traits(getAttributes) doesn't work on incomplete
templated types
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: qaston at gmail.com
--- Comment #0 from QAston <qaston at gmail.com> 2013-07-09 11:38:30 PDT ---
Minimized case:
enum Attribute;
@Attribute
class MyTemplate(T) {
}
@Attribute
class MyType {
}
pragma(msg, __traits(getAttributes, MyTemplate)); // prints: tuple()
pragma(msg, __traits(getAttributes, MyTemplate!uint)); // prints:
tuple((Attribute))
pragma(msg, __traits(getAttributes, MyType)); // prints: tuple((Attribute))
I think it either result should be the same for non-instantiated type as for
instantiated or pragma(msg, __traits(getAttributes, MyTemplate)) should yeld a
compile time error.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list