groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-4287) CLONE - import of static nested classes in external groovy files is broken
Date Thu, 21 Feb 2019 06:19:02 GMT

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

Paul King closed GROOVY-4287.
-----------------------------

> CLONE - import of static nested classes in external groovy files is broken
> --------------------------------------------------------------------------
>
>                 Key: GROOVY-4287
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4287
>             Project: Groovy
>          Issue Type: Sub-task
>          Components: Compiler
>    Affects Versions: 1.7.3
>            Reporter: Paul King
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Splitting off problematic but critical case of resolving static nested and inner classes
in external groovy files from GROOVY-4267. Copying Roshan's example from that issue:
> {code:title=Test.groovy}
> import static Outer.*
> // import static Outer.Inner // also fails
> // import Outer.Inner        // also fails
> assert Inner.class.name != null
> {code}
> {code:title=Outer.groovy}
> class Outer {
>     static class Inner {}
> }
> {code}
> Output:
> {noformat}
> Caught: groovy.lang.MissingPropertyException: No such property: Inner for class: Test
>         at Test.run(Test.groovy:4)
> {noformat}
> Error message is slightly different for non-static import:
> {noformat}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> Test.groovy: 2: unable to resolve class Outer.Inner
>  @ line 2, column 1.
>    import Outer.Inner
>    ^
> 1 error
> {noformat}



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

Mime
View raw message