Explorar o código

fix multiple forward declarations

Vladislav Folts %!s(int64=12) %!d(string=hai) anos
pai
achega
9c953b5b4b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/scope.js

+ 4 - 1
src/scope.js

@@ -50,7 +50,10 @@ var Scope = Class.extend({
         }
     },
     findSymbol: function(ident){return this.__symbols[ident];},
-    addUnresolved: function(id){this.__unresolved.push(id);},
+    addUnresolved: function(id){
+        if (this.__unresolved.indexOf(id) == -1)
+            this.__unresolved.push(id);
+    },
     unresolved: function(){return this.__unresolved;}
 });