Speedup generic relations detection

This commit is contained in:
Anatoly Galiulin
2016-06-24 15:22:22 +06:00
parent 764668d099
commit 75cca15c65

View File

@@ -970,7 +970,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
# simply no match for now:
discard
elif x.kind == tyGenericInst and
isGenericSubtype(x, f, depth) and
((f.sons[0] == x.sons[0]) or isGenericSubtype(x, f, depth)) and
(sonsLen(x) - 1 == sonsLen(f)):
for i in countup(1, sonsLen(f) - 1):
if x.sons[i].kind == tyGenericParam: