diff options
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r-- | test/compress/reduce_vars.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 943dd290..f4dd68d2 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -1544,3 +1544,30 @@ issue_1670_6: { } expect_stdout: "1" } + +unary_delete: { + options = { + evaluate: true, + reduce_vars: true, + unused: true, + } + input: { + var b = 10; + function f() { + var a; + if (delete a) b--; + } + f(); + console.log(b); + } + expect: { + var b = 10; + function f() { + var a; + if (delete a) b--; + } + f(); + console.log(b); + } + expect_stdout: true +} |