fix corner case in inline (#3859)

fixes #3858
This commit is contained in:
Alex Lam S.L
2020-05-08 08:03:29 +01:00
committed by GitHub
parent 7a033bb825
commit 998245ffd6
2 changed files with 27 additions and 0 deletions

View File

@@ -4030,6 +4030,7 @@ merge(Compressor.prototype, {
if (stat instanceof AST_Return) {
var call = stat.value;
if (!call || call.TYPE != "Call") break;
if (call.is_expr_pure(compressor)) break;
var fn = call.expression;
if (fn instanceof AST_SymbolRef) {
if (self.name && self.name.definition() === fn.definition()) break;