diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-04-26 20:31:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 03:31:19 +0800 |
commit | a4a8ccea8c323f8a41a5f2e7df907f41876ff9f6 (patch) | |
tree | bc36423ccdaf7a9a2953800558c1c74ae0a6b900 /lib | |
parent | 36dcfa3e821de8c0569284aeea13abd001e195eb (diff) | |
download | tracifyjs-a4a8ccea8c323f8a41a5f2e7df907f41876ff9f6.tar.gz tracifyjs-a4a8ccea8c323f8a41a5f2e7df907f41876ff9f6.zip |
fix corner case in `inline` (#3822)
fixes #3821
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index 3d1b17f3..67884a13 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -6130,8 +6130,12 @@ merge(Compressor.prototype, { return; } if (node instanceof AST_Scope) return abort = true; - var def; - if (node instanceof AST_SymbolRef && fn.variables.get(node.name) === (def = node.definition())) { + if (node instanceof AST_SymbolRef) { + var def = node.definition(); + if (fn.variables.get(node.name) !== def) { + in_order = null; + return; + } if (def.init instanceof AST_Defun) return abort = true; if (is_lhs(node, this.parent())) return abort = true; var index = resolve_index(def); |