fix corner case in reduce_vars (#4563)

fixes #4562
This commit is contained in:
Alex Lam S.L
2021-01-17 17:47:07 +00:00
committed by GitHub
parent 8d21516623
commit e616916de5
4 changed files with 41 additions and 18 deletions

View File

@@ -646,3 +646,20 @@ issue_4544_2: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4562: {
options = {
evaluate: true,
reduce_vars: true,
rests: true,
unsafe: true,
}
input: {
console.log((([ ...[ a ] ]) => a)("foo"));
}
expect: {
console.log((([ a ]) => a)("foo"));
}
expect_stdout: "f"
node_version: ">=6"
}