account for catch in constant lambda expressions (#3454)

This commit is contained in:
Alex Lam S.L
2019-10-06 16:51:37 +08:00
committed by GitHub
parent 0a63f2f2b0
commit 8a4c7077bb

View File

@@ -3403,6 +3403,12 @@ merge(Compressor.prototype, {
var inner_scopes = [];
self.walk(new TreeWalker(function(node, descend) {
if (!result) return true;
if (node instanceof AST_Catch) {
inner_scopes.push(node.argname.scope);
descend();
inner_scopes.pop();
return true;
}
if (node instanceof AST_Scope && node !== self) {
inner_scopes.push(node);
descend();