fix corner cases in merge_vars & with exports (#4762)

fixes #4761
This commit is contained in:
Alex Lam S.L
2021-03-11 01:16:16 +00:00
committed by GitHub
parent b4944a31a4
commit 862b1b77b5
4 changed files with 42 additions and 11 deletions

View File

@@ -3281,3 +3281,23 @@ issue_4759: {
}
expect_stdout: "undefined"
}
issue_4761: {
options = {
merge_vars: true,
toplevel: true,
}
input: {
var a = "FAIL", b;
try {
!a && --a && (b = 0)[console] || console.log(b);
} catch (e) {}
}
expect: {
var a = "FAIL", b;
try {
!a && --a && (b = 0)[console] || console.log(b);
} catch (e) {}
}
expect_stdout: "undefined"
}