fix corner case in unused (#5629)

fixes #5628
This commit is contained in:
Alex Lam S.L
2022-08-24 22:01:12 +01:00
committed by GitHub
parent 4db81065ee
commit 9cdc1ef6c2
2 changed files with 21 additions and 1 deletions

View File

@@ -560,3 +560,23 @@ issue_5444: {
export var a = console;
}
}
issue_5628: {
options = {
unused: true,
}
input: {
var a;
export default function f() {
for (a in 42);
}
console.log(a);
}
expect: {
var a;
export default function f() {
for (a in 42);
}
console.log(a);
}
}