aboutsummaryrefslogtreecommitdiff
path: root/test/compress/drop-unused.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/drop-unused.js')
-rw-r--r--test/compress/drop-unused.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js
index 942762f9..833b8c61 100644
--- a/test/compress/drop-unused.js
+++ b/test/compress/drop-unused.js
@@ -2102,3 +2102,28 @@ issue_3497: {
}
expect_stdout: "undefined"
}
+
+issue_3515: {
+ options = {
+ collapse_vars: true,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ var c = 0;
+ (function() {
+ this[c++] = 0;
+ var expr20 = !0;
+ for (var key20 in expr20);
+ })();
+ console.log(c);
+ }
+ expect: {
+ var c = 0;
+ (function() {
+ for (var key20 in !(this[c++] = 0));
+ })();
+ console.log(c);
+ }
+ expect_stdout: "1"
+}