golo-lang/golo-lang — pull request #153 by Artpej (2014-06-03 10:00:35+00:00)
Title: Fix varargs function call with array

Call varargs function with an array as last argument act now like in Java,
so that the following code has expected behaviour :

```golo
function varargs = |args...| {
foreach (arg in args) {
println(arg)
}
}

function main = |args...| {
let a = array[1, 2, 3, 4]
varargs(a)
# prints :
# 1
# 2
# 3
# 4
}
```

Call a varags function with an empty varargs argument caused a NoSuchMethodError,
so that the following code is now correct :

```golo
function varargs = |str,args...| {
println(str)
foreach (arg in args) {
println(arg)
}
}

function main = |args...| {
varargs("foo")
# prints :
# foo
}
```

This two changes are done for closures and constructors too.