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

@ -442,6 +442,7 @@ proc TypeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
if t.len == 0: result = "typedesc"
else: result = "typedesc[" & constraintsToStr(t) & "]"
of tyTypeClass:
if t.n != nil: return t.sym.owner.name.s
case t.len
of 0: result = "typeclass[]"
of 1: result = "typeclass[" & consToStr(t.sons[0]) & "]"