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

Paul King closed GROOVY-8947.
-----------------------------

> Fail to resolve non-static inner class outside of outer class
> -------------------------------------------------------------
>
>                 Key: GROOVY-8947
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8947
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-4
>            Reporter: Daniel Sun
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 3.0.0-beta-1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code:java}
> public class Computer {
>     public class Cpu {
>         int coreNumber
>         public Cpu(int coreNumber) {
>             this.coreNumber = coreNumber
>         }
>     }
>     public static newInstance() {
>         return new Computer().new Cpu(4)
>     }
> }
> assert 4 == new Computer().new Cpu(4).coreNumber // unable to resolve class 
> Cpu 
> // assert 4 == Computer.newInstance().coreNumber // resolve class Cpu 
> successfully
> {code}



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

Reply via email to