You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Shil Sinha (JIRA)" <ji...@apache.org> on 2015/11/25 06:57:11 UTC
[jira] [Resolved] (GROOVY-7342) last enum value is hidden if
annotated
[ https://issues.apache.org/jira/browse/GROOVY-7342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shil Sinha resolved GROOVY-7342.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.5.0-beta-1
> 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
> Assignee: Shil Sinha
> Priority: Minor
> Fix For: 2.5.0-beta-1
>
> 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)