implemented delegators and improved the error messages of unmatched type classes

This commit is contained in:
Zahary Karadjov 2013-08-26 21:53:56 +03:00
commit 28d9398de7
13 changed files with 130 additions and 93 deletions

View file

@ -608,7 +608,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
if genericParams.sons[i].sym.name.id == finalTypId.id:
return genericParams.sons[i].typ
var s = newSym(skType, finalTypId, getCurrOwner(), info)
var s = newSym(skType, finalTypId, typeClass.sym, info)
if typId == nil: s.flags.incl(sfAnon)
s.linkTo(typeClass)
s.position = genericParams.len