take into consideration non-identifier nodes in es6.blockScopingTDZ transformer, also turn default and parameters into lets instead of vars - fixes #929

This commit is contained in:
Sebastian McKenzie
2015-03-03 22:30:52 +11:00
parent bafa3e0d4c
commit 73062ae240
6 changed files with 41 additions and 13 deletions

View File

@@ -0,0 +1,9 @@
function foo(
{ x: { y: { z: a = b } = {}, w: b = 20 }, a: c = 30 }
) {
assert.equal(a, 10);
assert.equal(b, 20);
assert.equal(c, 30);
}
foo({ x: {} });

View File

@@ -0,0 +1,9 @@
function foo(
{ x: { y: { z: a = 10 } = {}, w: b = 20 }, a: c = 30 }
) {
assert.equal(a, 10);
assert.equal(b, 20);
assert.equal(c, 30);
}
foo({ x: {} });