fix propagation of symbol references
authorMihai Bazon <mihai@bazon.net>
Thu, 11 Oct 2012 07:28:48 +0000 (10:28 +0300)
committerMihai Bazon <mihai@bazon.net>
Thu, 11 Oct 2012 07:28:48 +0000 (10:28 +0300)
lib/scope.js

index cd48084..40237b3 100644 (file)
@@ -226,6 +226,7 @@ AST_SymbolRef.DEFMETHOD("reference", function() {
     var s = this.scope;
     while (s) {
         push_uniq(s.enclosed, def);
+        if (s === def.scope) break;
         s = s.parent_scope;
     }
 });