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
Comment #2 by github-bugzilla — 2013-09-21T17:09:39Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/28dc52f3f1eeec025d18ae49d1ba4105da4dfbd2 Fixes Issue 11088 - Print better diagnostics for enum member overflow errors. https://github.com/D-Programming-Language/dmd/commit/a6075687eb9da2f7a5104d2663c25a65d96f08ed Merge pull request #2581 from AndrejMitrovic/Fix110088 Issue 11088 - Print better diagnostics for enum member overflow errors.