[Issue 14556] New: [REG2.067] can't instantiate struct that has constructor and static array of enum
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu May 7 15:18:48 PDT 2015
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 at puremagic.com
Reporter: ag0aep6g at 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
--
More information about the Digitalmars-d-bugs
mailing list