enhance unused (#4129)

This commit is contained in:
Alex Lam S.L
2020-09-19 18:45:52 +01:00
committed by GitHub
parent f0ae03ed39
commit 3c609e2f4a
5 changed files with 17 additions and 12 deletions

View File

@@ -4747,6 +4747,13 @@ merge(Compressor.prototype, {
}));
}
}
} else if (node instanceof AST_UnaryPostfix
&& node.expression instanceof AST_SymbolRef
&& indexOf_assign(node.expression.definition(), node) < 0) {
return make_node(AST_UnaryPrefix, node, {
operator: "+",
expression: node.expression
});
}
}
if (node instanceof AST_Call) calls_to_drop_args.push(node);