bugfix: constraint matching for tyGenericInst; implements #130

This commit is contained in:
Araq 2012-07-19 08:41:57 +02:00
commit c9513c2e5a
3 changed files with 32 additions and 2 deletions

View file

@ -249,7 +249,7 @@ proc tupleRel(c: var TCandidate, f, a: PType): TTypeRelation =
proc matchTypeClass(c: var TCandidate, f, a: PType): TTypeRelation =
for i in countup(0, f.sonsLen - 1):
let son = f.sons[i]
var match = son.kind == skipTypes(a, {tyRange}).kind
var match = son.kind == skipTypes(a, {tyRange, tyGenericInst}).kind
if not match:
case son.kind