www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16981] New: [Reg 2.073] assigning class or struct pointers to


          Issue ID: 16981
           Summary: [Reg 2.073] assigning class or struct pointers to enum
                    became an error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
void bug()
    import std.regex : ctRegex;
    enum te = ctRegex!("a");
dmd -c -o- bug
bug.d(4): Error: variable bug.bug.te : Unable to initialize enum with class or
pointer to struct. Use static const variable instead.

Works without deprecation in 2.072.1.

Dec 18 2016