avoid double counting within single-use functions (#2785)

fixes #2783
This commit is contained in:
Alex Lam S.L
2018-01-15 16:42:15 +08:00
committed by GitHub
parent f96929c031
commit cbbe6fad60
2 changed files with 39 additions and 0 deletions

View File

@@ -5022,6 +5022,7 @@ merge(Compressor.prototype, {
}
if (single_use && fixed) {
if (fixed instanceof AST_Defun) {
fixed._squeezed = true;
fixed = make_node(AST_Function, fixed, fixed);
}
var value;