diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-29 16:22:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 00:22:03 +0800 |
commit | 1956edd503bde9db8e99d8a499d54d5a508f8bb8 (patch) | |
tree | 32b1f05ad7820a1070639ef78ae5caf4fcfd0ac9 /test/compress/evaluate.js | |
parent | 560ccc1221639dca9db354ad6830e418a9f0073d (diff) | |
download | tracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.tar.gz tracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.zip |
fix corner cases with `arguments` (#4481)
fixes #4480
Diffstat (limited to 'test/compress/evaluate.js')
-rw-r--r-- | test/compress/evaluate.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 7466d63b..73c982f2 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -3117,3 +3117,28 @@ issue_4422: { } expect_stdout: "PASS" } + +issue_4480: { + options = { + evaluate: true, + reduce_vars: true, + unused: true, + } + input: { + var a = function f(b) { + b = "FAIL"; + arguments[0] = "PASS"; + var arguments = 0; + console.log(b); + }(a); + } + expect: { + var a = function(b) { + b = "FAIL"; + arguments[0] = "PASS"; + var arguments = 0; + console.log(b); + }(a); + } + expect_stdout: "PASS" +} |