aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/loops.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js
index e24b3712..878b77cb 100644
--- a/test/compress/loops.js
+++ b/test/compress/loops.js
@@ -1009,3 +1009,31 @@ issue_4082: {
}
expect_stdout: "PASS"
}
+
+issue_4084: {
+ options = {
+ keep_fargs: "strict",
+ loops: true,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ console.log(function() {
+ function f(a) {
+ var b = a++;
+ for (a in "foo");
+ }
+ f();
+ return typeof a;
+ }());
+ }
+ expect: {
+ console.log(function() {
+ (function() {
+ 0;
+ })();
+ return typeof a;
+ }());
+ }
+ expect_stdout: "undefined"
+}