fix escape analysis for AST_Throw (#2564)

This commit is contained in:
Alex Lam S.L
2017-12-08 02:54:37 +08:00
committed by GitHub
parent e20935c3f2
commit 74a2f53683
2 changed files with 164 additions and 1 deletions

View File

@@ -652,7 +652,7 @@ merge(Compressor.prototype, {
}
if (parent instanceof AST_Assign && parent.operator == "=" && node === parent.right
|| parent instanceof AST_Call && node !== parent.expression
|| parent instanceof AST_Return && node === parent.value && node.scope !== d.scope
|| parent instanceof AST_Exit && node === parent.value && node.scope !== d.scope
|| parent instanceof AST_VarDef && node === parent.value) {
d.escaped = true;
return;