@@ -255,7 +255,9 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
|
|||||||
i = in_arg.lastIndexOf(sym.scope, i - 1);
|
i = in_arg.lastIndexOf(sym.scope, i - 1);
|
||||||
if (i < 0) break;
|
if (i < 0) break;
|
||||||
var decl = sym.orig[0];
|
var decl = sym.orig[0];
|
||||||
if (decl instanceof AST_SymbolFunarg || decl instanceof AST_SymbolLambda) {
|
if (decl instanceof AST_SymbolCatch
|
||||||
|
|| decl instanceof AST_SymbolFunarg
|
||||||
|
|| decl instanceof AST_SymbolLambda) {
|
||||||
node.in_arg = true;
|
node.in_arg = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2001,3 +2001,39 @@ issue_4420: {
|
|||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
node_version: ">=8"
|
node_version: ">=8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4425: {
|
||||||
|
rename = true
|
||||||
|
input: {
|
||||||
|
var a;
|
||||||
|
console.log(function() {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
throw 42;
|
||||||
|
} catch ({
|
||||||
|
[a]: a,
|
||||||
|
}) {}
|
||||||
|
return "FAIL";
|
||||||
|
} catch (e) {
|
||||||
|
return "PASS";
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var a;
|
||||||
|
console.log(function() {
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
throw 42;
|
||||||
|
} catch ({
|
||||||
|
[b]: b,
|
||||||
|
}) {}
|
||||||
|
return "FAIL";
|
||||||
|
} catch (c) {
|
||||||
|
return "PASS";
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
node_version: ">=8"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user