[Issue 10531] New: Enum base type not inferred from initializer of first member
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 3 10:34:48 PDT 2013
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: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 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: -------
More information about the Digitalmars-d-bugs
mailing list