golo-lang/golo-lang — pull request #226 by MakeNowJust (2014-12-23 12:24:43+00:00)
Title: MethodHandle#spread is broken

Before, it is cashing...

`code`

```golo
module Main

function main = |args| {
print(|x, y| {
x + y
}: spread(array[1, 2]))
}
```

`result`

```
Exception in thread "main" java.lang.IllegalArgumentException: array is not of length 2
at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:109)
at java.lang.invoke.MethodHandleImpl.checkSpreadArgument(MethodHandleImpl.java:495)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at fr.insalyon.citi.golo.runtime.ClosureCallSupport.fallback(ClosureCallSupport.java:100)
at gololang.StandardAugmentations$java$lang$invoke$MethodHandle.spread(standard-augmentations.golo:172)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at fr.insalyon.citi.golo.runtime.MethodInvocationSupport.fallback(MethodInvocationSupport.java:161)
at Main.main(hello.golo:4)
at fr.insalyon.citi.golo.cli.Main.callRun(Main.java:455)
at fr.insalyon.citi.golo.cli.Main.golo(Main.java:494)
at fr.insalyon.citi.golo.cli.Main.main(Main.java:215)
```