fix inline after single-use reduce_vars (#2623)

This commit is contained in:
Alex Lam S.L
2017-12-19 22:19:33 +08:00
committed by GitHub
parent 01057cf76d
commit 2273655c17
2 changed files with 74 additions and 1 deletions

View File

@@ -4004,7 +4004,9 @@ merge(Compressor.prototype, {
var catches = Object.create(null);
do {
scope = compressor.parent(level++);
if (scope instanceof AST_Catch) {
if (scope instanceof AST_SymbolRef) {
scope = scope.fixed_value();
} else if (scope instanceof AST_Catch) {
catches[scope.argname.name] = true;
}
} while (!(scope instanceof AST_Scope));