Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0
-
None
Description
Classes that extend another class with static inner classes are unable to see the inner classes without including the parent class name as part of the class reference.
Example:
class X { static class Y {} } class Z extends X { Z() { Y y = new Y(); } }
The compiler fails to compile "Z" saying it cannot resolve class "Y"; however, it will accept "X.Y y = new X.Y()".
The child class should not have to reference the parent class directly to get to its inner classes, should it?
Attachments
Issue Links
- is cloned by
-
GROOVY-7762 Static inner classes not visible to child classes
- Closed