aboutsummaryrefslogtreecommitdiff
path: root/test/compress/dead-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/dead-code.js')
-rw-r--r--test/compress/dead-code.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js
index 501d55ec..93fc9f41 100644
--- a/test/compress/dead-code.js
+++ b/test/compress/dead-code.js
@@ -1042,3 +1042,25 @@ function_assign: {
}
expect_stdout: "PASS"
}
+
+issue_3552: {
+ options = {
+ dead_code: true,
+ pure_getters: "strict",
+ }
+ input: {
+ var a = "PASS";
+ (function() {
+ (1..p += 42) && (a = "FAIL");
+ })();
+ console.log(a);
+ }
+ expect: {
+ var a = "PASS";
+ (function() {
+ (1..p += 42) && (a = "FAIL");
+ })();
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+}