diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-10-24 15:44:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-24 22:44:20 +0800 |
commit | e478da24c7b185322c8898444470036fdec31c0d (patch) | |
tree | 8e5363b1a4374c1a25416d3ad9c77c13e8f78c50 /lib | |
parent | c5df8355ba00fdf5ffa81192e0d88cf0dca90061 (diff) | |
download | tracifyjs-e478da24c7b185322c8898444470036fdec31c0d.tar.gz tracifyjs-e478da24c7b185322c8898444470036fdec31c0d.zip |
fix corner case in `collapse_vars` (#4243)
fixes #4242
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 216ca92a..647c97e1 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1974,6 +1974,7 @@ merge(Compressor.prototype, { } function foldable(expr) { + if (expr instanceof AST_Assign && expr.right.single_use) return; var lhs_ids = Object.create(null); var marker = new TreeWalker(function(node) { if (node instanceof AST_SymbolRef) lhs_ids[node.definition().id] = true; |