Accumulate penalties
This commit is contained in:
parent
75cca15c65
commit
bef7f72636
1 changed files with 1 additions and 1 deletions
|
|
@ -976,7 +976,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
|
||||||
if x.sons[i].kind == tyGenericParam:
|
if x.sons[i].kind == tyGenericParam:
|
||||||
internalError("wrong instantiated type!")
|
internalError("wrong instantiated type!")
|
||||||
elif typeRel(c, f.sons[i], x.sons[i]) <= isSubtype: return
|
elif typeRel(c, f.sons[i], x.sons[i]) <= isSubtype: return
|
||||||
c.inheritancePenalty = depth
|
c.inheritancePenalty += depth
|
||||||
result = isGeneric
|
result = isGeneric
|
||||||
else:
|
else:
|
||||||
let genericBody = f.sons[0]
|
let genericBody = f.sons[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue