From d09f0adae3605b8bf5d90a934037f71ae0c27780 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Thu, 17 Oct 2013 18:20:33 +0300 Subject: [PATCH] `arguments` outside of a function is an ordinary variable. Fix #501 --- lib/scope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scope.js b/lib/scope.js index 8fc1ce0b..713a2c92 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -165,7 +165,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){ for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) s.uses_eval = true; } - if (name == "arguments") { + if (func && name == "arguments") { func.uses_arguments = true; } } else { -- 2.34.1