[
https://issues.apache.org/jira/browse/GROOVY-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16748095#comment-16748095
]
Daniel Sun commented on GROOVY-4287:
------------------------------------
The proposed PR is ready to review: https://github.com/apache/groovy/pull/858
P.S. merged in 72 hours if no one rejects.
> 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: 10m
> 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)