fix corner case in side_effects (#5024)

fixes #5023
This commit is contained in:
Alex Lam S.L
2021-06-22 17:36:07 +01:00
committed by GitHub
parent 7c5b6f349e
commit 95090dbf24
2 changed files with 47 additions and 1 deletions

View File

@@ -5275,7 +5275,7 @@ merge(Compressor.prototype, {
|| any(this.body, compressor);
});
def(AST_SymbolRef, function(compressor) {
return !this.is_declared(compressor);
return !this.is_declared(compressor) || !can_drop_symbol(this, compressor);
});
def(AST_Template, function(compressor) {
if (any(this.expressions, compressor)) return true;