Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
This script:
@groovy.transform.TupleConstructor class Picker { @Lazy result = foo() } new Picker()
gives this error:
java.lang.VerifyError: (class: Picker, method: <init> signature: ()V) Expecting to find object/array on stack at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483) at java.lang.Class.getDeclaredConstructors(Class.java:1891) at org.codehaus.groovy.reflection.CachedClass$2$1.run(CachedClass.java:69)
Also, this script:
@groovy.transform.TupleConstructor class Picker { @Lazy result = null } new Picker()
gives this error:
groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: result for class: Picker