diff options
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r-- | test/compress/collapse_vars.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index c042f969..709fc6b7 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -8538,3 +8538,25 @@ issue_4051: { } expect_stdout: "undefined" } + +issue_4070: { + options = { + collapse_vars: true, + pure_getters: "strict", + reduce_vars: true, + } + input: { + console.log(function f() { + function g() {} + g.p++; + return f.p = g.p; + }()); + } + expect: { + console.log(function f() { + function g() {} + return f.p = ++g.p; + }()); + } + expect_stdout: "NaN" +} |