aboutsummaryrefslogtreecommitdiff
path: root/test/compress/destructured.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-24 09:02:18 +0000
committerGitHub <noreply@github.com>2020-12-24 17:02:18 +0800
commit18966945324786d29def134662221a068297161d (patch)
tree9cd23edc4262ff7ab0d8b32a9b315a9788abc56d /test/compress/destructured.js
parent5f269cd57356fc4dbe7486dca22902d22695d499 (diff)
downloadtracifyjs-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.js18
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"
+}