fix corner case in collapse_vars (#3978)

fixes #3976
This commit is contained in:
Alex Lam S.L
2020-06-09 12:07:20 +01:00
committed by GitHub
parent 3b273cecac
commit ed7c82fa5e
2 changed files with 39 additions and 1 deletions

View File

@@ -1468,7 +1468,7 @@ merge(Compressor.prototype, {
if (node instanceof AST_Call) {
var fn = node.expression;
if (fn instanceof AST_SymbolRef) {
if (fn.definition().recursive_refs > 0) return true;
if (recursive_ref(compressor, fn.definition())) return true;
fn = fn.fixed_value();
}
if (!(fn instanceof AST_Lambda)) return true;