digitalmars.D.bugs - [Issue 14556] New: [REG2.067] can't instantiate struct that has
- via Digitalmars-d-bugs (34/34) May 07 2015 https://issues.dlang.org/show_bug.cgi?id=14556
https://issues.dlang.org/show_bug.cgi?id=14556 Issue ID: 14556 Summary: [REG2.067] can't instantiate struct that has constructor and static array of enum Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Keywords: rejects-valid Severity: regression Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: ag0aep6g gmail.com ---- enum E {a = 1} struct OnlyResult { this(E) {} E[1] data; } void main() { auto o = OnlyResult(E.a); /* line 11 */ } ---- Compiles fine with 2.066.1 and older. With 2.067.0 and later: "test.d(11): Error: cannot implicitly convert expression (0) of type int to E[1]" Discovered by Nick Sabalausky in D.learn: http://forum.dlang.org/post/migjge$eat$1 digitalmars.com --
May 07 2015