From 9f23185f2bb0d23d5dd2e2334c589e97132a37a8 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 5 Jan 2018 22:21:18 +0800 Subject: fix corner case with `arguments` as function name (#2729) fixes #2728 --- lib/scope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scope.js') diff --git a/lib/scope.js b/lib/scope.js index 801c888c..a18e92a3 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -151,7 +151,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ node.references = []; } if (node instanceof AST_SymbolLambda) { - defun.def_function(node, defun); + defun.def_function(node, node.name == "arguments" ? undefined : defun); } else if (node instanceof AST_SymbolDefun) { // Careful here, the scope where this should be defined is -- cgit v1.2.3