Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.1, 2.1.2
-
None
Description
def a = new Dummy() //def a = new Object() Closure cl = {a.foo()} a.metaClass.foo {println "Original version"} cl(1.5G) a.metaClass.foo {println "Updated version"} cl(1.5G) class Dummy {} This issue imposes some problems on GPars DynamicDispatchActors:
This script outputs:
Original version
Original version
while I would expect
Original version
Updated version
Additionally, the behavior differs depending on whether "a" is an instance of a Java or a Groovy class. After making "a" an instance of a Java class, I get the expected output.