fix corner case in reduce_funcs (#5049)

fixes #5048
This commit is contained in:
Alex Lam S.L
2021-07-04 08:09:05 +01:00
committed by GitHub
parent f4ae267920
commit f5dbb672b9
2 changed files with 22 additions and 2 deletions

View File

@@ -7677,3 +7677,22 @@ issue_4949: {
}
expect_stdout: "0 1"
}
issue_5048: {
options = {
reduce_funcs: true,
reduce_vars: true,
unused: true,
}
input: {
console.log(function() {
var a = function() {
return a + 42;
};
}());
}
expect: {
console.log(function() {}());
}
expect_stdout: "undefined"
}