fix corner case in merge_vars (#4116)

fixes #4115
This commit is contained in:
Alex Lam S.L
2020-09-16 20:11:57 +01:00
committed by GitHub
parent 219aac6a84
commit 2a053710bd
2 changed files with 32 additions and 0 deletions

View File

@@ -486,3 +486,29 @@ issue_4112: {
}
expect_stdout: "function"
}
issue_4115: {
options = {
merge_vars: true,
toplevel: true,
}
input: {
L: {
var o = typeof console;
for (var k in o)
break L;
var a = 0;
}
console.log(typeof a);
}
expect: {
L: {
var o = typeof console;
for (var k in o)
break L;
var a = 0;
}
console.log(typeof a);
}
expect_stdout: "undefined"
}