fix corner case in reduce_vars & unused (#4208)

fixes #4207
This commit is contained in:
Alex Lam S.L
2020-10-13 00:32:17 +01:00
committed by GitHub
parent 9272f662c0
commit 176c09c6a5
2 changed files with 29 additions and 9 deletions

View File

@@ -909,3 +909,24 @@ issue_4205: {
}
expect_stdout: true
}
issue_4207: {
options = {
reduce_funcs: true,
reduce_vars: true,
unused: true,
}
input: {
{
const a = function() {};
console.log(a.length);
}
}
expect: {
{
const a = function() {};
console.log(a.length);
}
}
expect_stdout: "0"
}