Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.1.1Release
-
Component/s: Inferencing Engine
-
Labels:None
-
Number of attachments :
Description
A common idiom in Groovy is to change the owner of a closure to the object that is invoking it. For example:
new Foo().run {
someMethod()
}
Typically, the closure that is passed to run() will have its owner changed to an object of type Foo. That means someMethod() is really this.someMethod(), which is invoked on a Foo object.
I think this is a strong enough convention that we can encode this in the inferencing engine.