fix corner case in inline (#3915)

fixes #3911
This commit is contained in:
Alex Lam S.L
2020-05-21 15:05:31 +01:00
committed by GitHub
parent 798841be82
commit aeb9ea5ac2
2 changed files with 26 additions and 1 deletions

View File

@@ -6234,9 +6234,9 @@ merge(Compressor.prototype, {
&& !fn.uses_arguments
&& !fn.pinned()
&& !(fn.name && fn instanceof AST_Function)
&& (value = can_flatten_body(stat))
&& (exp === fn
|| !recursive_ref(compressor, def = exp.definition()) && fn.is_constant_expression(exp.scope))
&& (value = can_flatten_body(stat))
&& !fn.contains_this()) {
if (can_substitute_directly()) {
var args = self.args.slice();