fix corner case in reduce_vars (#4569)

fixes #4568
This commit is contained in:
Alex Lam S.L
2021-01-18 22:34:48 +00:00
committed by GitHub
parent e23a10f7f9
commit b57bae4b9e
3 changed files with 49 additions and 1 deletions

View File

@@ -2900,3 +2900,22 @@ issue_4250: {
}
expect_stdout: "0"
}
issue_4568: {
options = {
ie8: true,
reduce_vars: true,
unused: true,
}
input: {
console.log(typeof f, function(a) {
return a.length;
}([ function f() {} ]));
}
expect: {
console.log(typeof f, function(a) {
return a.length;
}([ function f() {} ]));
}
expect_stdout: "undefined 1"
}