fix corner case in merge_vars (#5421)

fixes #5420
This commit is contained in:
Alex Lam S.L
2022-04-17 23:38:08 +01:00
committed by GitHub
parent e396912ea2
commit 20252c6483
2 changed files with 30 additions and 3 deletions

View File

@@ -3702,3 +3702,33 @@ issue_5182: {
]
node_version: ">=4"
}
issue_5420: {
options = {
merge_vars: true,
toplevel: true,
}
input: {
do {
var a = "FAIL 1";
a && a.p;
a = "FAIL 2";
try {
continue;
} catch (e) {}
var b = "FAIL 3";
} while (console.log(b || "PASS"));
}
expect: {
do {
var a = "FAIL 1";
a && a.p;
a = "FAIL 2";
try {
continue;
} catch (e) {}
var b = "FAIL 3";
} while (console.log(b || "PASS"));
}
expect_stdout: "PASS"
}