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 10:33:00 UTC
[jira] [Commented] (GROOVY-4287) CLONE - import of static nested
classes in external groovy files is broken
[ https://issues.apache.org/jira/browse/GROOVY-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741531#comment-16741531 ]
Daniel Sun commented on GROOVY-4287:
------------------------------------
As https://issues.apache.org/jira/browse/GROOVY-7812 can be fixed now. I will look into this issue later.
> 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
> Priority: Major
>
> 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)