fix corner case in merge_vars (#4295)

fixes #4294
This commit is contained in:
Alex Lam S.L
2020-11-18 01:32:53 +00:00
committed by GitHub
parent aff842f2f9
commit 7a51c17ff0
3 changed files with 35 additions and 1 deletions

View File

@@ -115,7 +115,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
// ignore lvalues
if (parent instanceof U.AST_Assign && parent.left === node) return;
if (parent instanceof U.AST_Destructured) return;
if (parent instanceof U.AST_DestructuredArray) return;
if (parent instanceof U.AST_DestructuredKeyVal && parent.value === node) return;
if (parent instanceof U.AST_Unary && parent.expression === node) switch (parent.operator) {
case "++":