fix corner case in inline (#5377)

fixes #5376
This commit is contained in:
Alex Lam S.L
2022-03-05 19:29:56 +00:00
committed by GitHub
parent e2b00814a8
commit 042c228c7b
2 changed files with 60 additions and 0 deletions

View File

@@ -13340,6 +13340,7 @@ Compressor.prototype.compress = function(node) {
def.single_use = false;
if (!in_loop) return;
if (def.references.length == def.replaced) return;
if (def.orig.length == def.eliminated) return;
if (def.orig.length == 1 && fn.functions.has(name)) return;
if (!all(def.orig, function(sym) {
if (sym instanceof AST_SymbolConst) return false;