diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-19 21:47:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 05:47:15 +0800 |
commit | 8ce3c7d70fb476a65dc23f27bb5444ee89e59652 (patch) | |
tree | f5829f803de96ad6028a0429f13c9d47e0e3e9b5 /test/compress | |
parent | 87cf7152135281a4b1a1163b26ea918a0a264f0b (diff) | |
download | tracifyjs-8ce3c7d70fb476a65dc23f27bb5444ee89e59652.tar.gz tracifyjs-8ce3c7d70fb476a65dc23f27bb5444ee89e59652.zip |
fix corner case in `evaluate` & `reduce_vars` (#4423)
fixes #4422
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/evaluate.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 8ef1a466..7466d63b 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -3094,3 +3094,26 @@ issue_4393: { } expect_stdout: "PASS" } + +issue_4422: { + options = { + evaluate: true, + reduce_vars: true, + unused: true, + } + input: { + console.log(function f(a) { + a = "FAIL 1"; + arguments[0] = "PASS"; + return a; + }("FAIL 2")); + } + expect: { + console.log(function(a) { + a = "FAIL 1"; + arguments[0] = "PASS"; + return a; + }("FAIL 2")); + } + expect_stdout: "PASS" +} |