fix corner case in merge_vars (#4505)

fixes #4504
This commit is contained in:
Alex Lam S.L
2021-01-05 06:23:46 +00:00
committed by GitHub
parent 5fbbb43839
commit fc5aee662d
2 changed files with 36 additions and 11 deletions

View File

@@ -2326,3 +2326,29 @@ issue_4500: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4504: {
options = {
inline: true,
merge_vars: true,
}
input: {
A = "FAIL";
(function f(a) {
({
[console.log(a)]: 0[(b => console + b)(A)]
} = 0);
})("PASS");
}
expect: {
A = "FAIL";
(function f(a) {
({
[console.log(a)]: 0[b = A, console + b]
} = 0);
var b;
})("PASS");
}
expect_stdout: "PASS"
node_version: ">=6"
}