fix corner case in functions (#4824)

fixes #4823
This commit is contained in:
Alex Lam S.L
2021-03-25 00:49:01 +00:00
committed by GitHub
parent 03c5ecb2e3
commit 39df3a1680
2 changed files with 31 additions and 0 deletions

View File

@@ -6226,6 +6226,7 @@ merge(Compressor.prototype, {
&& var_defs[sym.id] == 1
&& sym.assignments == 0
&& value instanceof AST_LambdaExpression
&& !is_arguments(sym)
&& !is_arrow(value)
&& assigned_once(value, sym.references)
&& can_declare_defun(value)