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.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/side_effects.js b/test/compress/side_effects.js
index 63282660..b7ffe47a 100644
--- a/test/compress/side_effects.js
+++ b/test/compress/side_effects.js
@@ -274,3 +274,26 @@ drop_value: {
foo(), bar();
}
}
+
+operator_in: {
+ options = {
+ side_effects: true,
+ }
+ input: {
+ try {
+ "foo" in true;
+ console.log("FAIL");
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect: {
+ try {
+ 0 in true;
+ console.log("FAIL");
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect_stdout: "PASS"
+}