Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.3
-
Fix Version/s: 1.8.5, 2.0-beta-2, 1.7.11
-
Component/s: class generator
-
Labels:None
-
Number of attachments :
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.
Activity
Cedric Champeau
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Jochen Theodorou [ blackdrag ] | Cedric Champeau [ melix ] |
Cedric Champeau
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.0-beta-2 [ 18072 ] | |
| Fix Version/s | 1.8.5 [ 18071 ] | |
| Resolution | Fixed [ 1 ] |
Cedric Champeau
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
Cedric Champeau
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Fix Version/s | 1.7.11 [ 17244 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |