diff options
Diffstat (limited to 'test/compress/loops.js')
-rw-r--r-- | test/compress/loops.js | 28 |
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" +} |