fix corner case in side_effects (#4343)

fixes #4342
This commit is contained in:
Alex Lam S.L
2020-12-07 09:25:04 +00:00
committed by GitHub
parent fbecedf94c
commit 4bde50ce85
2 changed files with 34 additions and 10 deletions

View File

@@ -425,3 +425,25 @@ issue_4331: {
expect_stdout: "PASS"
node_version: ">=8"
}
issue_4342: {
options = {
side_effects: true,
}
input: {
try {
new function() {}(...42);
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
[ ...42 ];
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
node_version: ">=6"
}