Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.7
-
None
-
JDK 7u55 on Win7 x64, IntellJ Idea 13.1.5
Description
This script failes, unless @CompileStatic is removed:
import groovy.transform.CompileStatic test() @CompileStatic void test() { def obj = new DelegateClass() obj.with { def locl = prop = "XYZ" assert locl == prop } } class DelegateClass { String prop }
Decompiling the class file shows that the inner, right-most assignment to the property of the closure delegate produces a constant null result instead of passing the right hand side result through all chained assignments.