diff options
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r-- | test/compress/reduce_vars.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index cef29832..5906a971 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -2575,3 +2575,28 @@ accessor: { } expect_stdout: "1 1" } + +for_in_prop: { + options = { + reduce_vars: true, + } + input: { + var a = { + foo: function() { + for (this.b in [1, 2]); + } + }; + a.foo(); + console.log(a.b); + } + expect: { + var a = { + foo: function() { + for (this.b in [1, 2]); + } + }; + a.foo(); + console.log(a.b); + } + expect_stdout: "1" +} |