aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-01-05 22:21:18 +0800
committerGitHub <noreply@github.com>2018-01-05 22:21:18 +0800
commit9f23185f2bb0d23d5dd2e2334c589e97132a37a8 (patch)
treeda7073d594df8d69e9ebec145a438856419575cb /lib/scope.js
parentb82feb9302adddb1763e9915b0daf9ff35ab2af2 (diff)
downloadtracifyjs-9f23185f2bb0d23d5dd2e2334c589e97132a37a8.tar.gz
tracifyjs-9f23185f2bb0d23d5dd2e2334c589e97132a37a8.zip
fix corner case with `arguments` as function name (#2729)
fixes #2728
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js2
1 files changed, 1 insertions, 1 deletions
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