Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-rc-1
-
None
Description
Consider the following:
enum Orientation { LANDSCAPE, PORTRAIT, @Override String toString() { name().toLowerCase().capitalize() } } println Orientation.values()
Parser error "unexpected token" for comma after PORTRAIT. Remove comma and no issue. Parsers support enum with trailing comma (no class members).
See also GROOVY-4438 and GROOVY-8507
Attachments
Issue Links
- is a clone of
-
GROOVY-9301 [Antlr2]Parser error for enum constant with comma followed by method
- Closed