Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.6
-
Fix Version/s: 1.7.3, 1.8-beta-1
-
Component/s: parser
-
Labels:None
-
Environment:Any
-
Number of attachments :
Description
The Groovy parser does not allow a trailing comma in an enum definition:
enum Foo {
X, Y, Z,
}
According to the Java language specification (V. 3):
EnumDeclaration: ClassModifiersopt enum Identifier Interfacesopt EnumBody
EnumBody: { EnumConstantsopt ,opt EnumBodyDeclarationsopt }
Note the ",opt" in the EnumBody.
Actually, it does allow:
enum Foo { X, Y, Z, }but not this:
enum Foo { X, Y, Z, }