Skip to content

Commit

Permalink
fix Issue 2351 - enum with no members allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 22, 2012
1 parent 128f6bd commit 31be563
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions enum.dd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ $(GNAME EnumBaseType):
$(GLINK2 declaration, Type)

$(GNAME EnumBody):
$(GLINK EmptyEnumBody)
$(GLINK EnumMembersBody)

$(GNAME EmptyEnumBody):
$(B ;)

$(GNAME EnumMembersBody):
$(B {) $(GLINK EnumMembers) $(B })

$(GNAME EnumMembers):
Expand Down Expand Up @@ -81,8 +87,8 @@ $(V2
it's value is 0.
)

$(P Enums must have at least one member.
)
$(P An $(I EmptyEnumBody) signifies an opaque enum - the enum members are
unknown.)

<h3>Enum Default Initializer</h3>

Expand Down

0 comments on commit 31be563

Please sign in to comment.