fix corner case in rests (#4539)

fixes #4538
This commit is contained in:
Alex Lam S.L
2021-01-12 01:12:30 +00:00
committed by GitHub
parent 52e94a0723
commit c12486bab4
2 changed files with 21 additions and 2 deletions

View File

@@ -525,3 +525,22 @@ issue_4525_2: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4538: {
options = {
rests: true,
unused: true,
}
input: {
console.log(typeof function f(...a) {
return a.p, f;
}()());
}
expect: {
console.log(typeof function f(...a) {
return a.p, f;
}()());
}
expect_stdout: "function"
node_version: ">=6"
}