Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0, 2.4.0-beta-3
-
None
Description
The following code compiles but throws a VerifyError at runtime:
Test.groovy
class Test { static void main(String[] args) { def a = new A() } static class A { A() { def b = new B() } void sayA() { println 'saying A' } class B extends A { public B() { super(A.this) sayA() } } } }
I didn't go back through versions but I tested with 2.3.0 and that shows the problem.
Caught: java.lang.VerifyError: (class: Test$A$B, method: <init> signature: (LTest$A;)V) Expecting to find object/array on stack java.lang.VerifyError: (class: Test$A$B, method: <init> signature: (LTest$A;)V) Expecting to find object/array on stack at Test$A.<init>(Test.groovy:9) at Test.main(Test.groovy:4)
Attachments
Issue Links
- is duplicated by
-
GROOVY-7609 java.lang.VerifyError when initializing object of inner class within the constructor of its containing class
- Closed
- is related to
-
GROOVY-6777 Inner class causes VerifierError
- Closed
- links to