get rid of ImportTablePos and ModuleTablePos

This commit is contained in:
Zahary Karadjov 2013-05-12 01:20:40 +03:00
commit 7a2b1a7520
9 changed files with 76 additions and 76 deletions

View file

@ -289,8 +289,9 @@ proc fitRemoveHiddenConv(c: PContext, typ: Ptype, n: PNode): PNode =
changeType(result, typ, check=false)
proc findShadowedVar(c: PContext, v: PSym): PSym =
for i in countdown(c.tab.tos - 2, ModuleTablePos+1):
let shadowed = StrTableGet(c.tab.stack[i], v.name)
for scope in walkScopes(c.currentScope.parent):
if scope == c.topLevelScope: break
let shadowed = StrTableGet(scope.symbols, v.name)
if shadowed != nil and shadowed.kind in skLocalVars:
return shadowed