Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8-beta-1
-
None
Description
r19740 removed the following constructor from CurriedClosure class
public CurriedClosure(Closure uncurriedClosure, int i) { this(uncurriedClosure, new Object[]{Integer.valueOf(i)}); }
ACG still calls this non-existent constructor in the bytecode it generates for ClosureListExpression and the compiled code results in the following error at runtime
java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.CurriedClosure.<init>(Lgroovy/lang/Closure;I)V
Here is the test to reproduce it:
import org.codehaus.groovy.runtime.CurriedClosure class GroovyXXXXBug extends GroovyTestCase { void testClosureListExpressionUsage() { def clList = (1;2) assert clList[0] instanceof CurriedClosure assert clList[1] instanceof CurriedClosure } }