Bug 11088 – Diagnostics for enum member overflows should improve
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-21T12:18:00Z
Last change time
2013-09-21T17:09:49Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-09-21T12:18:48Z
-----
enum E {
A = int.max,
B
}
-----
test.d(3): Error: enum member test.E.B overflow of enum value cast(E)2147483647
It should be:
test.d(3): Error: enum member test.E.B initialization with (E.A + 1) causes overflow for type 'int'
Comment #1 by andrej.mitrovich — 2013-09-21T12:23:49Z