[Issue 17545] New: [REG2.072] __traits(getMember, mod, name) evaluates enum to value prematurely

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 24 09:59:29 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17545

          Issue ID: 17545
           Summary: [REG2.072] __traits(getMember, mod, name) evaluates
                    enum to value prematurely
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: johanengelen at weka.io

The following code used to compile with DMD 2.071, but fails for >=2.072.

```
module example;

import std.meta: staticIndexOf;

struct Attrib {}

@Attrib enum TEST = 123;

pragma(msg, __traits(getAttributes, 
                     __traits(getMember, example, "TEST")));

```

--


More information about the Digitalmars-d-bugs mailing list