progress towards adding negative type classes

[unittest bugfixes]
the block form of check now allows comments
errors when inspecting the arguments of var-accepting procs
This commit is contained in:
Zahary Karadjov 2013-12-09 00:09:03 +02:00
commit de3b7cd413
9 changed files with 267 additions and 46 deletions

View file

@ -20,7 +20,8 @@ proc instantiateGenericParamList(c: PContext, n: PNode, pt: TIdTable,
if a.kind != nkSym:
InternalError(a.info, "instantiateGenericParamList; no symbol")
var q = a.sym
if q.typ.kind notin {tyTypeDesc, tyGenericParam, tyTypeClass, tyExpr}: continue
if q.typ.kind notin {tyTypeDesc, tyGenericParam, tyExpr}+tyTypeClasses:
continue
var s = newSym(skType, q.name, getCurrOwner(), q.info)
s.flags = s.flags + {sfUsed, sfFromGeneric}
var t = PType(IdTableGet(pt, q.typ))
@ -193,7 +194,7 @@ proc fixupProcType(c: PContext, genericType: PType,
if result == nil: return
case genericType.kind
of tyGenericParam, tyTypeClass:
of tyGenericParam, tyTypeClasses:
result = inst.concreteTypes[genericType.sym.position]
of tyTypeDesc:
result = inst.concreteTypes[genericType.sym.position]