Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.3
-
None
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
Attachments
Issue Links
- is related to
-
GROOVY-7812 Static inner classes cannot be accessed from other files when running by 'groovy' command
- Closed
- links to