diff options
author | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2016-06-27 09:16:19 +0600 |
---|---|---|
committer | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2016-06-27 09:16:19 +0600 |
commit | bef7f726369d845dfbb376ee3531c028bef62498 (patch) | |
tree | 49b7748cb92546e15bfa9bca5bdb870553044174 /compiler/sigmatch.nim | |
parent | 75cca15c6513da5ef8da1117160e882b0f0f1c1b (diff) | |
download | Nim-bef7f726369d845dfbb376ee3531c028bef62498.tar.gz |
Accumulate penalties
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r-- | compiler/sigmatch.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index ed5dd6ca1..70fbe7358 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -976,7 +976,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation = if x.sons[i].kind == tyGenericParam: internalError("wrong instantiated type!") elif typeRel(c, f.sons[i], x.sons[i]) <= isSubtype: return - c.inheritancePenalty = depth + c.inheritancePenalty += depth result = isGeneric else: let genericBody = f.sons[0] |