final fixes giving us a working compiler

This commit is contained in:
Zahary Karadjov 2013-05-12 02:19:17 +03:00
commit f317807a89
8 changed files with 19 additions and 22 deletions

View file

@ -410,12 +410,11 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
result = n
if n.sons[bodyPos].kind == nkEmpty:
LocalError(n.info, errImplOfXexpected, s.name.s)
let curScope = c.tab.tos - 1
var proto = SearchForProc(c, s, curScope)
var proto = SearchForProc(c, c.currentScope, s)
if proto == nil:
addInterfaceOverloadableSymAt(c, c.currentScope, s)
else:
SymTabReplace(c.tab.stack[curScope], proto, s)
SymTabReplace(c.currentScope.symbols, proto, s)
if n.sons[patternPos].kind != nkEmpty:
c.patterns.add(s)