fix corner cases in ie8 & side_effects (#4731)

fixes #4729
fixes #4730
This commit is contained in:
Alex Lam S.L
2021-03-03 19:30:07 +00:00
committed by GitHub
parent 2a49760032
commit 20be5209c0
3 changed files with 67 additions and 6 deletions

View File

@@ -558,3 +558,33 @@ drop_side_effect_free_call: {
}
expect_stdout: "PASS"
}
issue_4730_1: {
options = {
side_effects: true,
}
input: {
var a;
console.log("PASS") + (a && a[a.p]);
}
expect: {
var a;
console.log("PASS");
}
expect_stdout: "PASS"
}
issue_4730_2: {
options = {
side_effects: true,
}
input: {
var a;
!console.log("PASS") || a && a[a.p];
}
expect: {
var a;
console.log("PASS");
}
expect_stdout: "PASS"
}