fix AST_Function scope invariance (#2052)

improve function name hack in `run_code()`
This commit is contained in:
Alex Lam S.L
2017-06-04 19:27:43 +08:00
committed by GitHub
parent 84634da4b5
commit 540220b91b
4 changed files with 44 additions and 13 deletions

View File

@@ -2957,7 +2957,7 @@ merge(Compressor.prototype, {
&& !(def.scope.uses_arguments
&& def.orig[0] instanceof AST_SymbolFunarg)
&& !def.scope.uses_eval
&& compressor.find_parent(AST_Scope) === def.scope) {
&& compressor.find_parent(AST_Scope) === exp.parent_scope) {
self.expression = exp;
}
}