fix corner case in reduce_vars (#3867)

fixes #3866
This commit is contained in:
Alex Lam S.L
2020-05-10 09:35:03 +01:00
committed by GitHub
parent abb8ae02a5
commit 33f3b0c1d9
3 changed files with 28 additions and 5 deletions

View File

@@ -7033,3 +7033,24 @@ issue_3844: {
}
expect_stdout: "undefined"
}
issue_3866: {
options = {
dead_code: true,
evaluate: true,
reduce_vars: true,
}
input: {
console.log(function() {
{
return "PASS";
var a = 0;
}
return --a;
}());
}
expect: {
console.log("PASS");
}
expect_stdout: "PASS"
}