diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-24 09:02:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 17:02:18 +0800 |
commit | 18966945324786d29def134662221a068297161d (patch) | |
tree | 9cd23edc4262ff7ab0d8b32a9b315a9788abc56d /test/compress/destructured.js | |
parent | 5f269cd57356fc4dbe7486dca22902d22695d499 (diff) | |
download | tracifyjs-18966945324786d29def134662221a068297161d.tar.gz tracifyjs-18966945324786d29def134662221a068297161d.zip |
fix & enhance `collapse_vars` (#4447)
fixes #4446
Diffstat (limited to 'test/compress/destructured.js')
-rw-r--r-- | test/compress/destructured.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 5594658d..7fe2f0c8 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -2146,3 +2146,21 @@ issue_4436_undefined: { expect_stdout: true node_version: ">=6" } + +issue_4446: { + options = { + collapse_vars: true, + } + input: { + a = "PASS"; + var a = [ a[0] ] = [ a ]; + console.log(a[0]); + } + expect: { + a = "PASS"; + var a = [ a[0] ] = [ a ]; + console.log(a[0]); + } + expect_stdout: "PASS" + node_version: ">=6" +} |