diff options
author | Mihai Bazon <mihai@bazon.net> | 2013-10-17 18:20:33 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-10-17 18:20:33 +0300 |
commit | d09f0adae3605b8bf5d90a934037f71ae0c27780 (patch) | |
tree | dc750909c2cadb539ad28010bf267074c7f0f3c7 /lib/scope.js | |
parent | 3fa9265ce43b1273f737b5606d0bb5d4643ef436 (diff) | |
download | tracifyjs-d09f0adae3605b8bf5d90a934037f71ae0c27780.tar.gz tracifyjs-d09f0adae3605b8bf5d90a934037f71ae0c27780.zip |
`arguments` outside of a function is an ordinary variable.
Fix #501
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |