fix corner case in loops & unused (#4076)

fixes #4075
This commit is contained in:
Alex Lam S.L
2020-08-26 10:32:20 +01:00
committed by GitHub
parent c7a3e09407
commit 93d084a1d1
2 changed files with 25 additions and 1 deletions

View File

@@ -963,3 +963,25 @@ issue_3634_2: {
}
expect_stdout: "1"
}
issue_4075: {
options = {
loops: true,
unused: true,
}
input: {
var a = "FAIL";
(function() {
for (a in { PASS: 0 });
})()
console.log(a);
}
expect: {
var a = "FAIL";
(function() {
for (a in { PASS: 0 });
})()
console.log(a);
}
expect_stdout: "PASS"
}