fix corner case in merge_vars (#4102)

fixes #4101
This commit is contained in:
Alex Lam S.L
2020-09-15 12:18:12 +01:00
committed by GitHub
parent 3ac575f2e8
commit d64d0b0bec
2 changed files with 40 additions and 0 deletions

View File

@@ -182,6 +182,35 @@ switch_branch: {
expect_stdout: "PASS"
}
try_branch: {
options = {
merge_vars: true,
}
input: {
console.log(function(a) {
var b = "FAIL", c;
try {
a && F();
} catch (e) {
c = b;
}
return c || "PASS";
}());
}
expect: {
console.log(function(a) {
var b = "FAIL", c;
try {
a && F();
} catch (e) {
c = b;
}
return c || "PASS";
}());
}
expect_stdout: "PASS"
}
read_before_assign_1: {
options = {
inline: true,