Bug 6165 – Anonymous enums specification

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-06-16T14:00:00Z
Last change time
2012-01-20T22:47:44Z
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2011-06-16T14:00:25Z
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
Comment #1 by github-bugzilla — 2012-01-20T22:46:47Z