fix unused on AST_Destructuring (#2146)

This commit is contained in:
Alex Lam S.L
2017-06-23 13:11:26 +08:00
committed by GitHub
parent b163b13a0b
commit 137e4c4753
3 changed files with 23 additions and 44 deletions

View File

@@ -639,3 +639,23 @@ issue_2044_ecma_6_beautify: {
}
expect_exact: "({x: a = 1, y = 2 + b, z = 3 - c} = obj);"
}
issue_2140: {
options = {
unused: true,
}
input: {
!function() {
var t = {};
console.log(([t.a] = [42])[0]);
}();
}
expect: {
!function() {
var t = {};
console.log(([t.a] = [42])[0]);
}();
}
expect_stdout: "42"
node_version: ">=6"
}