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] [Commented] (GROOVY-7812) Static inner classes cannot be accessed from other files when running by 'groovy' command
Date Tue, 08 Jan 2019 14:53:00 GMT

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

Daniel Sun commented on GROOVY-7812:
------------------------------------

I will set aside some time to look into the issue.

> 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
>            Priority: Major
>
> 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)

Mime
View raw message