jashkenas/coffee-script — Issue #1825: splat not in last position in function call
Author: dwt
Created: 2011-11-04 10:24:38+00:00
State: open

Hi there,

a splat that is not in the last position of a function invocation doesn't work correctly (As far as I can see).

here's an example:

$ coffee -bpe "a = []; console.log('foo', a..., 'bar')"
var a;
var __slice = Array.prototype.slice;
a = [];
console.log.apply(console, ['foo'].concat(__slice.call(a), ['bar']));

I think the last 'bar' needs to be concatenated together instead of being handed in as separate argument.