@@ -257,6 +257,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
|
|||||||
sym = self.def_global(node);
|
sym = self.def_global(node);
|
||||||
} else if (name == "arguments"
|
} else if (name == "arguments"
|
||||||
&& sym.orig[0] instanceof AST_SymbolFunarg
|
&& sym.orig[0] instanceof AST_SymbolFunarg
|
||||||
|
&& !(sym.orig[1] instanceof AST_SymbolFunarg)
|
||||||
&& !(sym.scope instanceof AST_Arrow)) {
|
&& !(sym.scope instanceof AST_Arrow)) {
|
||||||
var parent = tw.parent();
|
var parent = tw.parent();
|
||||||
if (parent instanceof AST_Assign && parent.left === node
|
if (parent instanceof AST_Assign && parent.left === node
|
||||||
|
|||||||
@@ -3134,3 +3134,22 @@ issue_4404: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_4413: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log(function f(arguments) {
|
||||||
|
var arguments = function() {};
|
||||||
|
return arguments.length;
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log(function(arguments) {
|
||||||
|
return function() {}.length;
|
||||||
|
}());
|
||||||
|
}
|
||||||
|
expect_stdout: "0"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user