fix corner case in reduce_vars (#4950)

fixes #4949
This commit is contained in:
Alex Lam S.L
2021-05-21 11:49:07 +01:00
committed by GitHub
parent 4a19575e74
commit de376c3d33
2 changed files with 26 additions and 3 deletions

View File

@@ -7722,3 +7722,23 @@ issue_4943_2: {
"bar",
]
}
issue_4949: {
options = {
reduce_vars: true,
unused: true,
}
input: {
(function f(a) {
a = 0;
console.log(a++, arguments[0]);
})(0);
}
expect: {
(function(a) {
a = 0;
console.log(a++, arguments[0]);
})(0);
}
expect_stdout: "0 1"
}