You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2019/01/13 11:49:00 UTC

[jira] [Updated] (GROOVY-7812) Static inner classes cannot be accessed from other files when running by 'groovy' command

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

Daniel Sun updated GROOVY-7812:
-------------------------------
    Fix Version/s: 3.0.0-alpha-5
                   2.5.6

> Static inner classes cannot be accessed from other files when running by 'groovy' command
> -----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7812
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7812
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.6
>            Reporter: Nikolay Chashnikov
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Create the following files
> {code:title=Outer.groovy}
> class Outer {
>   static class Inner {
>   }
> }
> {code}
> {code:title=Main.groovy}
> println new Outer()
> println new Outer.Inner()
> {code}
> and run 'groovy Main.groovy'. It'll fail with the following message:
> {quote}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> /home/.../Main.groovy: 2: unable to resolve class Outer.Inner 
>  @ line 2, column 9.
>    println new Outer.Inner()
> {quote}



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