Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.3
-
None
Description
Instantiation fails at runtime if I have an inner class extending an inner class defined in the outer class's parent I get a NoSuchMethodError on instantiation. In other words, C2 extends C1 and C2.B extends C1.A yields C1$A: method <init>()V not found in C2.B's constructor. A repeatable test case is below:
class FailingInnerClassInheritance { public static void main(String[] args) { new C2() } } class C1 { class A {} } class C2 extends C1 { { new B() } class B extends C1.A {} }
The analogous example works in Java. It fails in Groovy even if we construct B later (after C2 construction) and try to supply various explicit constructors.