Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
import org.codehaus.groovy.control.CompilerConfiguration def config = new CompilerConfiguration() config.optimizationOptions.indy = true new GroovyShell(config).evaluate ''' def x(int a) {a} def x(int a, int b) {a + b} def y(p) { x(*p) } assert 1 == y([1]) assert 3 == y([1, 2]) '''
Error message:
java.lang.IllegalArgumentException: array is not of length 1 at Script1.y(Script1.groovy:5) at Script1.run(Script1.groovy:8) at ConsoleScript1.run(ConsoleScript1:5) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Attachments
Issue Links
- links to