Bug 8442 – [2.060 beta] Empty array enum not treated as immutable
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-25T14:31:00Z
Last change time
2015-06-09T05:11:58Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bus_dbugzilla
Comments
Comment #0 by bus_dbugzilla — 2012-07-25T14:31:08Z
-------------------------------------
enum int[] fooEnum = [];
immutable fooImmutable = fooEnum;
-------------------------------------
testImmutableEnum.d(2): Error: cannot implicitly convert expression ([]) of type int[] to immutable(int[])
-------------------------------------
Worked on 2.059. If fooEnum is *not* empty, the problem disappears.
Comment #1 by github-bugzilla — 2012-07-28T02:24:43Z