diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-22 07:03:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 14:03:27 +0800 |
commit | 6d4c0fa6fabd7c5c75be419ed166b326f3da6bf3 (patch) | |
tree | 014396007182bf32fd8848e2c0fc4d087e622951 /test | |
parent | 3cca0d624980e78db2c38ffaebdac53933be68fa (diff) | |
download | tracifyjs-6d4c0fa6fabd7c5c75be419ed166b326f3da6bf3.tar.gz tracifyjs-6d4c0fa6fabd7c5c75be419ed166b326f3da6bf3.zip |
fix corner case in `unused` (#4145)
fixes #4144
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/drop-unused.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index eadf279a..219adc9e 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -2945,3 +2945,23 @@ issue_4133: { } expect_stdout: "0" } + +issue_4144: { + options = { + keep_fargs: "strict", + reduce_vars: true, + unused: true, + } + input: { + (function(a, b) { + var b = console, c = ++b; + })(console.log("PASS"), 0); + } + expect: { + (function(b) { + b = console, + ++b; + })(console.log("PASS")); + } + expect_stdout: "PASS" +} |