migrate the static param handling to ReplaceTypeVars; fix tgenericvariant

This commit is contained in:
Zahary Karadjov 2013-12-30 19:11:42 +02:00
commit 754e2ef1db
6 changed files with 38 additions and 26 deletions

View file

@ -649,8 +649,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
if a.kind == tyEmpty: result = isEqual
of tyGenericInst:
if a.kind == tyGenericInst:
if a.base != f.base: return isNone
if a.kind == tyGenericInst and a.base == f.base:
for i in 1 .. f.sonsLen-2:
result = typeRel(c, f.sons[i], a.sons[i])
if result == isNone: return