www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17545] New: [REG2.072] __traits(getMember, mod, name)


          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 puremagic.com
          Reporter: johanengelen 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")));


Jun 24 2017