fix corner case in reduce_vars (#3332)

fixes #3267
This commit is contained in:
Alex Lam S.L
2019-03-13 21:56:38 +08:00
committed by GitHub
parent d4ac84b255
commit b052f62710
2 changed files with 101 additions and 1 deletions

View File

@@ -5787,8 +5787,8 @@ merge(Compressor.prototype, {
}
if (single_use && fixed) {
def.single_use = false;
fixed._squeezed = true;
if (fixed instanceof AST_Defun) {
fixed._squeezed = true;
fixed = make_node(AST_Function, fixed, fixed);
fixed.name = make_node(AST_SymbolLambda, fixed.name, fixed.name);
}