log spread element rest parameter as a candidate instead of replacing it in place - fixes #1796

This commit is contained in:
Sebastian McKenzie
2015-06-22 00:06:03 +01:00
parent ebaa06f4a2
commit 58cda35831
3 changed files with 19 additions and 2 deletions

View File

@@ -13,3 +13,8 @@ function foo(a, ...b) {
function foo(...b) {
foo(1, ...b);
}
function foo(...args){
args.pop()
foo(...args);
}

View File

@@ -23,3 +23,12 @@ function foo() {
foo.apply(undefined, [1].concat(b));
}
function foo() {
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
args.pop();
foo.apply(undefined, args);
}