fix corner case in merge_vars (#4629)

fixes #4628
This commit is contained in:
Alex Lam S.L
2021-02-09 04:36:12 +00:00
committed by GitHub
parent e13d1e9969
commit fcee32527b
2 changed files with 36 additions and 2 deletions

View File

@@ -3183,3 +3183,32 @@ issue_4257: {
"1",
]
}
issue_4628: {
options = {
merge_vars: true,
}
input: {
(function() {
try {
console;
} finally {
var b = a;
}
for (var a in "foo");
console.log(b);
})();
}
expect: {
(function() {
try {
console;
} finally {
var b = a;
}
for (var a in "foo");
console.log(b);
})();
}
expect_stdout: "undefined"
}