http://d.puremagic.com/issues/show_bug.cgi?id=10531
Summary: Enum base type not inferred from initializer of first
member
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-07-03 10:34:47 PDT ---
http://dlang.org/enum.html states:
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.
However:
enum E{x=""}
Error: cannot implicitly convert expression ("") of type string to int
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------