melon icon indicating copy to clipboard operation
melon copied to clipboard

Variadic arguments not working as expected

Open daniele-rapagnani opened this issue 4 years ago • 0 comments

Consider the following code:

let myFunc = |a, b, ...rest| => {
    io.print(#rest);
};

myFunc(1, 2);

This code will print 1, the rest array will be only contain the value null. The rest array is expected to be empty.

daniele-rapagnani avatar Dec 15 '20 16:12 daniele-rapagnani