www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10587] New: __traits(getAttributes) doesn't work on incomplete templated types

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 puremagic.com
        ReportedBy: qaston gmail.com



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: -------
Jul 09 2013