fix corner case in join_vars (#3796)

fixes #3795
This commit is contained in:
Alex Lam S.L
2020-04-18 11:08:05 +01:00
committed by GitHub
parent 708973e51d
commit b38838c6bf
2 changed files with 35 additions and 1 deletions

View File

@@ -2371,8 +2371,9 @@ merge(Compressor.prototype, {
var lhs = expr.left;
if (!(lhs instanceof AST_SymbolRef)) break;
if (is_undeclared_ref(lhs)) break;
if (lhs.scope !== scope) break;
var def = lhs.definition();
if (def.scope !== lhs.scope) break;
if (def.scope !== scope) break;
if (def.orig.length > def.eliminated + 1) break;
if (def.orig[0].TYPE != "SymbolVar") break;
var name = make_node(AST_SymbolVar, lhs, lhs);