fix corner case in side_effects (#5118)

This commit is contained in:
Alex Lam S.L
2021-08-23 01:51:59 +01:00
committed by GitHub
parent 9634a9d1fd
commit db94d21980
3 changed files with 47 additions and 8 deletions

View File

@@ -568,6 +568,20 @@ retain_empty_iife: {
node_version: ">=6"
}
drop_new_function: {
options = {
side_effects: true,
}
input: {
new function(a = console.log("PASS")) {}();
}
expect: {
void console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=6"
}
retain_fargs: {
options = {
unused: true,