aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-05-08 08:03:29 +0100
committerGitHub <noreply@github.com>2020-05-08 15:03:29 +0800
commit998245ffd6fcd56129d99a3829aa845fe1faa0d2 (patch)
tree7cf983a2d531d0a30d36e74d5bee06d2fd8c0ae0 /lib
parent7a033bb825975a6a729813b2cbe5a722a9047456 (diff)
downloadtracifyjs-998245ffd6fcd56129d99a3829aa845fe1faa0d2.tar.gz
tracifyjs-998245ffd6fcd56129d99a3829aa845fe1faa0d2.zip
fix corner case in `inline` (#3859)
fixes #3858
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 4dae2a9f..09eaacbf 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -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;