don't shadow default parameter scope iife and instead just apply the this and arguments - fixes #1128

This commit is contained in:
Sebastian McKenzie
2015-04-09 14:58:33 -07:00
parent 704b31f44f
commit 4e6aed0408
3 changed files with 37 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
const bar = true;
function foo(a = bar, ...b) {
const bar = false;
assert.equal(b[0], 2);
assert.equal(b[1], 3);
}
foo(1, 2, 3);