fix corner case in functions & reduce_vars (#4452)

fixes #4451
This commit is contained in:
Alex Lam S.L
2020-12-25 00:38:24 +00:00
committed by GitHub
parent ced32f9bd8
commit b2f27fd873
2 changed files with 28 additions and 4 deletions

View File

@@ -933,10 +933,10 @@ merge(Compressor.prototype, {
def.fixed = false;
}
}, true);
} else if (init instanceof AST_SymbolRef && !init.is_immutable()) {
} else if (init instanceof AST_SymbolRef) {
var def = init.definition();
def.assignments++;
def.fixed = false;
if (!init.is_immutable()) def.fixed = false;
}
this.body.walk(tw);
pop(tw);