fix AST corruption due to collapse_vars & inline (#2899)

fixes #2898
This commit is contained in:
Alex Lam S.L
2018-02-09 06:54:37 +08:00
committed by GitHub
parent bf1d47180c
commit 2088e1c19d
2 changed files with 31 additions and 0 deletions

View File

@@ -4379,6 +4379,7 @@ merge(Compressor.prototype, {
&& !self.pure
&& !fn.contains_this()
&& can_inject_symbols()) {
fn._squeezed = true;
return make_sequence(self, flatten_fn()).optimize(compressor);
}
if (compressor.option("side_effects") && all(fn.body, is_empty)) {