Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.7.3
-
Fix Version/s: None
-
Component/s: Compiler
-
Labels:None
-
Number of attachments :
Description
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:
Test.groovy
import static Outer.* // import static Outer.Inner // also fails // import Outer.Inner // also fails assert Inner.class.name != null
Outer.groovy
class Outer {
static class Inner {}
}
Output:
Caught: groovy.lang.MissingPropertyException: No such property: Inner for class: Test
at Test.run(Test.groovy:4)
Error message is slightly different for non-static import:
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