Bug 3096 – EnumBaseType

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-06-26T21:43:00Z
Last change time
2015-06-09T01:27:56Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
tim.matthews7

Comments

Comment #0 by tim.matthews7 — 2009-06-26T21:43:53Z
from: http://digitalmars.com/d/2.0/enum.html "If the EnumBaseType is not explicitly set, and the first EnumMember has an initializer, it is set to the type of that initializer. Otherwise, it defaults to type int." module test; enum LongEnum { SomeLong = 2147772029 //initializer } void main() { } test.d(5): Error: cannot implicitly convert expression (2147772029L) of type long to int
Comment #1 by henning — 2013-05-31T15:10:07Z
Comment #2 by henning — 2013-06-01T04:13:11Z
Comment #3 by github-bugzilla — 2013-06-28T07:03:53Z
Comment #4 by andrej.mitrovich — 2013-07-03T10:43:06Z
*** Issue 10531 has been marked as a duplicate of this issue. ***
Comment #5 by hsteoh — 2013-08-30T14:06:44Z
Commit 88ebe192d605bd8d4b5768e8a2500f54d73fb5fd introduced regression issue #10555.
Comment #6 by hsteoh — 2013-08-30T14:07:30Z
Sigh, let's try that again: issue #10555