From 7a2b1a7520bb80cbef88ad9c3dc843cbe512a588 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 12 May 2013 01:20:40 +0300 Subject: get rid of ImportTablePos and ModuleTablePos --- compiler/semmagic.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/semmagic.nim') 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 -- cgit 1.4.1-2-gfad0