diff options
Diffstat (limited to 'test/compress/default-values.js')
-rw-r--r-- | test/compress/default-values.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/default-values.js b/test/compress/default-values.js index c65ccd35..d1637524 100644 --- a/test/compress/default-values.js +++ b/test/compress/default-values.js @@ -1726,3 +1726,28 @@ issue_4916: { expect_stdout: "undefined" node_version: ">=6" } + +issue_4994: { + options = { + loops: true, + unused: true, + } + input: { + var a = "FAIL"; + (function(b = function() { + for (a in { PASS: 42 }); + }()) { + var a; + })(); + console.log(a); + } + expect: { + var a = "FAIL"; + (function(b = function() { + for (a in { PASS: 42 }); + }()) {})(); + console.log(a); + } + expect_stdout: "PASS" + node_version: ">=6" +} |