[Issue 6165] New: Anonymous enums specification
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 16 14:05:06 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6165
Summary: Anonymous enums specification
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bugzilla at digitalmars.com
--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2011-06-16 14:00:25 PDT ---
I believe there is an omission in the D specification document. The page for
enums specification http://d-programming-language.org/enum.html defines enum
body syntax as follows:
EnumBody:
;
{ EnumMembers }
Should it not be
EnumBody:
EnumMember ;
{ EnumMembers }
or perhaps
EnumBody:
EnumMembers ;
{ EnumMembers }
Otherwise, I can't quite grasp how following enums definitions are legal:
enum X = 4;
enum
mega = 1024 * 1024,
pi = 3.14,
euler = 2.72,
greet = "Hello";
(Both of the above enums are accepted by dmd v2.050).
Regards,
Lennart
--
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