groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (GROOVY-8947) Fail to resolve non-static inner class outside of outer class
Date Sat, 05 Jan 2019 16:33:00 GMT

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

Daniel Sun reassigned GROOVY-8947:
----------------------------------

    Assignee: Daniel Sun

> 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-alpha-5
>
>
> {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)

Mime
View raw message