-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.1
-
Fix Version/s: 2.2.2
-
Component/s: Static compilation
-
Labels:None
The following test case illustrates the issue, which only occurs if there are more than one argument to the call:
package org.codehaus.groovy.classgen.asm.sc.bugs import groovy.transform.stc.StaticTypeCheckingTestCase import org.codehaus.groovy.classgen.asm.sc.StaticCompilationTestSupport @Mixin(StaticCompilationTestSupport) class GroovyVerifyErrorBug extends StaticTypeCheckingTestCase { @Override protected void setUp() { super.setUp() extraSetup() } void testShouldNotThrowVerifyErrorIfUsingImplicitCall() { assertScript ''' class Foo { Closure isUpper = { String it, String up -> it.toUpperCase() == up } def test(String str) { isUpper(str, 'ABC') // replace with isUpper.call(str,'ABC') and no error } } def foo = new Foo() assert foo.test('abc') ''' } }
Using .call doesn't throw any VerifyError.