diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-19 12:47:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-19 12:47:46 +0800 |
commit | 9a5aede94147bf5769054fd933b1c15690915d25 (patch) | |
tree | 4901f7aea01c91dc94a43ee6e04c7324901a5528 /test/compress | |
parent | e6dd471f8fff84c878153008139150a090c5ba19 (diff) | |
download | tracifyjs-9a5aede94147bf5769054fd933b1c15690915d25.tar.gz tracifyjs-9a5aede94147bf5769054fd933b1c15690915d25.zip |
fix corner case in `reduce_vars` & `unused` (#4414)
fixes #4413
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/drop-unused.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 1c9ab61f..d048707a 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -3134,3 +3134,22 @@ issue_4404: { } expect_stdout: "PASS" } + +issue_4413: { + options = { + reduce_vars: true, + unused: true, + } + input: { + console.log(function f(arguments) { + var arguments = function() {}; + return arguments.length; + }()); + } + expect: { + console.log(function(arguments) { + return function() {}.length; + }()); + } + expect_stdout: "0" +} |