August 01, 2016 [Issue 16346] New: Enum used as a constructor evaluates to the underlying type, not to the enum type. | ||||
|---|---|---|---|---|
| ||||
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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply