diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-04-24 22:16:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 05:16:51 +0800 |
commit | a1a212f6393f690180a606c0610a4ca9279522ad (patch) | |
tree | ec160564b9c3f44840b3d8f70f529eb10d3865cb /test/compress/collapse_vars.js | |
parent | a2b1b96752c5f898539f8e28431461428c4c7731 (diff) | |
download | tracifyjs-a1a212f6393f690180a606c0610a4ca9279522ad.tar.gz tracifyjs-a1a212f6393f690180a606c0610a4ca9279522ad.zip |
fix corner case in `collapse_vars` (#4869)
fixes #4868
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r-- | test/compress/collapse_vars.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 4051bb14..36cba2a5 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -9010,3 +9010,23 @@ issue_4865: { } expect_stdout: true } + +issue_4868: { + options = { + collapse_vars: true, + unused: true, + } + input: { + var a; + (function(b) { + console.log(b[0]); + })(a = [ "PASS" ], a = [ "FAIL" ]); + } + expect: { + var a; + (function(b) { + console.log(b[0]); + })(a = [ "PASS" ], a = [ "FAIL" ]); + } + expect_stdout: "PASS" +} |