Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8-beta-2
-
None
-
None
Description
The problem is with metaprogramming and the ComposedClosure class. Because the ComposedClosure class does not implement the doCall method and the MetaClassImpl.invokeMethod method does not provide any special handling for ComposedClosures as it does for CurriedClosures and MethodClosures, the invocation of the doCall method in the method resolution process will fail. For example:
class ComposedTest {
def closure1 = {}
def closure2 = {}
def composed = closure1 >> closure2
}
def inst = new ComposedTest()
// This is fine because ComposedClosure implements the call method.
//inst.composed.call()
// This fails because ComposedClosure does not implement the doCall method.
inst.composed()