aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/scope.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js
index 66314766..3297b8e6 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -230,6 +230,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) {
} else {
new_def = scope.def_variable(node);
}
+ old_def.defun = new_def.scope;
old_def.orig.concat(old_def.references).forEach(function(node) {
node.thedef = new_def;
node.reference(options);