[ https://issues.apache.org/jira/browse/GROOVY-7342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024876#comment-15024876 ]
Shil Sinha commented on GROOVY-7342: ------------------------------------ The annotation causes Y to be parsed as a classField rather than as an enumConstant. Another temporary work around is to include {{@Fooann Y}} on the same line as X e.g. {code} @Fooann X, @Fooann Y {code} > last enum value is hidden if annotated > -------------------------------------- > > Key: GROOVY-7342 > URL: https://issues.apache.org/jira/browse/GROOVY-7342 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.3.10, 2.4.1 > Environment: Windows 7 > First seen in Eclipse Luna (which also doesn't syntax highlight it well) > Reporter: simon misys > Priority: Minor > Attachments: bug1.groovy > > > When I annotate the final enum value in an enum, the enum value is no longer > part of the enum, eg, running this via GroovyShell throws > MissingPropertyException on the last line: > {code} > @Target([ElementType.FIELD]) > @interface Fooann { > } > enum Foonum { > @Fooann > X, > @Fooann // all is well if either (a) this annotation is removed, > Y // or (b) this value has a trailing comma > } > class Bar { > Foonum foonum > } > println Foonum.X > println Foonum.Y > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)