fix corner case in side_effects (#4541)

fixes #4540
This commit is contained in:
Alex Lam S.L
2021-01-12 01:12:43 +00:00
committed by GitHub
parent c12486bab4
commit 1e831df1f6
2 changed files with 22 additions and 1 deletions

View File

@@ -1549,3 +1549,24 @@ issue_4523: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4540: {
options = {
reduce_vars: true,
side_effects: true,
}
input: {
console.log(function() {
function f([ a = 0 ]) {}
f([]);
}());
}
expect: {
console.log(function() {
function f([ a = 0 ]) {}
f([]);
}());
}
expect_stdout: "undefined"
node_version: ">=6"
}