fixes #35, fixes #43

This commit is contained in:
Araq 2011-08-08 01:15:09 +02:00
commit 12f22ba68a
4 changed files with 9 additions and 6 deletions

View file

@ -231,7 +231,8 @@ proc typeRel(mapping: var TIdTable, f, a: PType): TTypeRelation =
assert(f != nil)
assert(a != nil)
if a.kind == tyGenericInst and
skipTypes(f, {tyVar}).kind notin {tyGenericBody, tyGenericInvokation}:
skipTypes(f, {tyVar}).kind notin {
tyGenericBody, tyGenericInvokation, tyGenericParam}:
return typeRel(mapping, f, lastSon(a))
if a.kind == tyVar and f.kind != tyVar:
return typeRel(mapping, f, a.sons[0])