fix corner case in merge_vars (#5353)

fixes #5352
This commit is contained in:
Alex Lam S.L
2022-02-13 00:22:34 +00:00
committed by GitHub
parent 63b92ead4e
commit 316245ee12
2 changed files with 44 additions and 1 deletions

View File

@@ -2476,3 +2476,29 @@ issue_5322: {
expect_stdout: "42"
node_version: ">=12"
}
issue_5352: {
options = {
merge_vars: true,
}
input: {
function f(a) {
var b;
new class {
[b = console.log(a)] = b;
}(a.p);
}
f("PASS");
}
expect: {
function f(a) {
var b;
new class {
[b = console.log(a)] = b;
}(a.p);
}
f("PASS");
}
expect_stdout: "PASS"
node_version: ">=12"
}