@@ -369,8 +369,9 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
|
|||||||
// pass 3: fix up any scoping issue with IE8
|
// pass 3: fix up any scoping issue with IE8
|
||||||
if (options.ie) self.walk(new TreeWalker(function(node) {
|
if (options.ie) self.walk(new TreeWalker(function(node) {
|
||||||
if (node instanceof AST_SymbolCatch) {
|
if (node instanceof AST_SymbolCatch) {
|
||||||
var scope = node.thedef.defun;
|
var def = node.thedef;
|
||||||
if (scope.name instanceof AST_SymbolLambda && scope.name.name == node.name) {
|
var scope = def.defun;
|
||||||
|
if (def.name != "arguments" && scope.name instanceof AST_SymbolLambda && scope.name.name == def.name) {
|
||||||
scope = scope.parent_scope.resolve();
|
scope = scope.parent_scope.resolve();
|
||||||
}
|
}
|
||||||
redefine(node, scope);
|
redefine(node, scope);
|
||||||
|
|||||||
@@ -3044,3 +3044,28 @@ issue_5566_5: {
|
|||||||
expect_stdout: "foo bar"
|
expect_stdout: "foo bar"
|
||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5651: {
|
||||||
|
options = {
|
||||||
|
ie: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function arguments(a = "FAIL") {
|
||||||
|
try {} catch (arguments) {
|
||||||
|
var arguments;
|
||||||
|
}
|
||||||
|
return arguments[0];
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(function arguments(a = "FAIL") {
|
||||||
|
try {} catch (arguments) {
|
||||||
|
var arguments;
|
||||||
|
}
|
||||||
|
return arguments[0];
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect_stdout: true
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|||||||
@@ -3844,3 +3844,28 @@ issue_5573: {
|
|||||||
]
|
]
|
||||||
node_version: ">=6"
|
node_version: ">=6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5651: {
|
||||||
|
options = {
|
||||||
|
ie: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function arguments({}) {
|
||||||
|
try {} catch (arguments) {
|
||||||
|
var arguments;
|
||||||
|
}
|
||||||
|
return arguments[0];
|
||||||
|
}("PASS"));
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(function arguments({}) {
|
||||||
|
try {} catch (arguments) {
|
||||||
|
var arguments;
|
||||||
|
}
|
||||||
|
return arguments[0];
|
||||||
|
}("PASS"));
|
||||||
|
}
|
||||||
|
expect_stdout: true
|
||||||
|
node_version: ">=6"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user