Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.17, 2.5.8, 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 cloned by
-
GROOVY-9306 error for enum constant with comma followed by method
- Closed