[ 
https://issues.apache.org/jira/browse/GROOVY-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-7202.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5.0-rc-2
                   2.4.16
                   2.6.0-alpha-4
                   3.0.0-alpha-2

> Unable to resolve nested enum of parent class when compiling against binary 
> parent
> ----------------------------------------------------------------------------------
>
>                 Key: GROOVY-7202
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7202
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.3.3, 2.3.8
>         Environment: Tested on JDK 1.7.0_51 32 bit Windows
>            Reporter: Jason Winnebeck
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 3.0.0-alpha-2, 2.6.0-alpha-4, 2.4.16, 2.5.0-rc-2
>
>         Attachments: Base.groovy, Child.groovy
>
>
> {code:title=Base.groovy}
> class Base {
>   public static enum Color { Red, Green }
>   
>   public Color getColor() { Color.Red }
> }
> {code}
> {code:title=Child.groovy}
> class Child extends Base {
>   @Override
>   public Color getColor() { Color.Green }
> }
> {code}
> Steps to reproduce:
> # groovyc Base.groovy
> # rm Base.groovy
> # groovyc Child.groovy
> Note that `groovyc *.groovy` works, as well as putting the code into the 
> groovyconsole. It seems that this bug is triggered only when Base.groovy 
> source is not in sourcepath.
> Workaround is to put `import Base.Color` in Child.groovy. However, IDEs like 
> IntelliJ IDEA show this as an unnecessary import and remove the import when 
> optimizing imports (which can happen on every save depending on IDE 
> settings). Another workaround is to put absolute qualifier on Color enum, but 
> IDEA also provides warning for this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to