Bug 14556 – [REG2.067] can't instantiate struct that has constructor and static array of enum
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-07T22:18:00Z
Last change time
2015-07-21T12:53:49Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
ag0aep6g
Comments
Comment #0 by ag0aep6g — 2015-05-07T22:18:48Z
----
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/[email protected]
Comment #1 by dlang-bugzilla — 2015-05-08T07:29:27Z