digitalmars.D.bugs - [Issue 16346] New: Enum used as a constructor evaluates to the
- via Digitalmars-d-bugs (20/20) Aug 01 2016 https://issues.dlang.org/show_bug.cgi?id=16346
https://issues.dlang.org/show_bug.cgi?id=16346 Issue ID: 16346 Summary: Enum used as a constructor evaluates to the underlying type, not to the enum type. Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: enhancement Priority: P3 Component: dmd Assignee: nobody puremagic.com Reporter: eyal weka.io Test case: enum A { B } static assert(is(typeof(A.B) == A)); // succeeds static assert(is(typeof(A(A.B)) == A)); // fails --
Aug 01 2016