fix corner case in collapse_vars (#3597)

fixes #3596
This commit is contained in:
Alex Lam S.L
2019-11-19 02:30:52 +08:00
committed by GitHub
parent 02cc4a0d03
commit c289ba1139
3 changed files with 57 additions and 25 deletions

View File

@@ -6549,3 +6549,21 @@ issue_3581_2: {
}
expect_stdout: "PASS PASS"
}
issue_3596: {
options = {
collapse_vars: true,
pure_getters: "strict",
}
input: {
console.log(function f() {
return f[[ ][f.undefined = 42, 0]] += !1;
}());
}
expect: {
console.log(function f() {
return f[[ ][f.undefined = 42, 0]] += !1;
}());
}
expect_stdout: "42"
}