[Issue 19344] New: Enum member UDAs & getUDAs throwing an error
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Oct 30 22:59:47 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19344
          Issue ID: 19344
           Summary: Enum member UDAs & getUDAs throwing an error
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: czdanol at gmail.com
Having the following code:
import std.traits;
struct A {
        int func;
}
enum E  {
        @A(0) a
}
pragma(msg, getUDAs!(E.a, A));
I get:
onlineapp.d(8): Error: undefined identifier A
onlineapp.d(11): Error: template instance `std.traits.getUDAs!(cast(E)0, A)`
error instantiating
onlineapp.d(11):        while evaluating pragma(msg, getUDAs!(cast(E)0, A))
--
    
    
More information about the Digitalmars-d-bugs
mailing list