[ 
https://issues.apache.org/jira/browse/GROOVY-7342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024871#comment-15024871
 ] 

ASF GitHub Bot commented on GROOVY-7342:
----------------------------------------

GitHub user shils opened a pull request:

    https://github.com/apache/incubator-groovy/pull/194

    GROOVY-7342 Last enum value is hidden if annotated

    * Try syntactic predicate for enum constant before predicate for end of 
enum constants

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shils/incubator-groovy GROOVY-7342

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-groovy/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #194
    
----
commit eae120621bb1769ad315faf89d6bde8fec94d2bf
Author: Shil Sinha <shil.si...@gmail.com>
Date:   2015-11-24T17:00:39Z

    GROOVY-7342 Last enum value is hidden if annotated
    * Try syntactic predicate for enum constant before predicate for end of 
enum constants

----


> 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)

Reply via email to