summary refs log tree commit diff stats
path: root/compiler/semmagic.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-05-12 01:20:40 +0300
committerZahary Karadjov <zahary@gmail.com>2013-05-12 01:20:40 +0300
commit7a2b1a7520bb80cbef88ad9c3dc843cbe512a588 (patch)
tree3a618acb804f76d1110c8037a5b2fb74b61adb5a /compiler/semmagic.nim
parent3d1c6de63853dc141b919dc853ade4380a478206 (diff)
downloadNim-7a2b1a7520bb80cbef88ad9c3dc843cbe512a588.tar.gz
get rid of ImportTablePos and ModuleTablePos
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r--compiler/semmagic.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index 058964fc8..41c379133 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -80,8 +80,9 @@ proc semLocals(c: PContext, n: PNode): PNode =
   result = newNodeIT(nkPar, n.info, tupleType)
   tupleType.n = newNodeI(nkRecList, n.info)
   # for now we skip openarrays ...
-  for i in countdown(c.tab.tos-1, ModuleTablePos+1):
-    for it in items(c.tab.stack[i]):
+  for scope in walkScopes(c.currentScope):
+    if scope == c.topLevelScope: break
+    for it in items(scope.symbols):
       # XXX parameters' owners are wrong for generics; this caused some pain
       # for closures too; we should finally fix it.
       #if it.owner != c.p.owner: return result