aboutsummaryrefslogtreecommitdiff
path: root/test/compress/side_effects.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/side_effects.js')
-rw-r--r--test/compress/side_effects.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/side_effects.js b/test/compress/side_effects.js
index fd6cabc6..03298274 100644
--- a/test/compress/side_effects.js
+++ b/test/compress/side_effects.js
@@ -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"
+}