www.digitalmars.com         C & C++   DMDScript  

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


           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

--- Comment #0 from QAston <qaston gmail.com> 2013-07-09 11:38:30 PDT ---
Minimized case:
enum Attribute;

class MyTemplate(T) {

class MyType {

pragma(msg, __traits(getAttributes, MyTemplate)); // prints: tuple()
pragma(msg, __traits(getAttributes, MyTemplate!uint)); // prints:
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