aboutsummaryrefslogtreecommitdiff
path: root/test/reduce.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-03 02:34:46 +0000
committerGitHub <noreply@github.com>2021-01-03 10:34:46 +0800
commite8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6 (patch)
treea63d1918822a0d876351d55df5a1f26f16f260b9 /test/reduce.js
parent110c1ac0978dbfbcd16150abadaa9f049bafa04c (diff)
downloadtracifyjs-e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6.tar.gz
tracifyjs-e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6.zip
suppress invalid AST transform in `--reduce-test` (#4498)
Diffstat (limited to 'test/reduce.js')
-rw-r--r--test/reduce.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/reduce.js b/test/reduce.js
index e45cfa5d..54494c56 100644
--- a/test/reduce.js
+++ b/test/reduce.js
@@ -341,7 +341,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
else if (node instanceof U.AST_PropAccess) {
var expr = [
node.expression,
- node.property instanceof U.AST_Node && node.property,
+ node.property instanceof U.AST_Node && !(parent instanceof U.AST_Destructured) && node.property,
][ node.start._permute++ % 2 ];
if (expr) {
CHANGED = true;