fix corner case in properties (#3390)

fixes #3389
This commit is contained in:
Alex Lam S.L
2019-04-29 17:23:00 +08:00
committed by GitHub
parent 413bbe0480
commit c37a8e927e
2 changed files with 29 additions and 3 deletions

View File

@@ -1862,3 +1862,29 @@ join_expr: {
}
expect_stdout: "PASS"
}
issue_3389: {
options = {
evaluate: true,
properties: true,
reduce_vars: true,
unsafe: true,
}
input: {
(function() {
var a = "PASS";
if (delete b)
b = a[null] = 42;
console.log(a);
})();
}
expect: {
(function() {
var a = "PASS";
if (delete b)
b = a.null = 42;
console.log(a);
})();
}
expect_stdout: "PASS"
}