Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.7
-
None
-
None
Description
The following code will fail at runtime with a VerifyError:
class Top { int x() { 1 } } @groovy.transform.CompileStatic class Bottom extends Top { int x() { Thread.start { println(super.x()) } 2 } } new Bottom().x()
Removing @CompileStatic fixes the issue. The problem is very likely that the static compiler interprets "super" as the super from the closure instead of the super from the owner. Which also means a bridge method might be needed.