Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
import groovy.transform.* @ToString class Pogo { private static V = 42 Number n = V } @NamedVariant(autoDelegate=true) void test(Pogo p) { print p } test([:]) // MissingPropertyException: No such property: V for class: script
Variable expression "V" is transferred from scope of Pogo to generated method test(Map)