diff options
author | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2016-06-24 15:22:22 +0600 |
---|---|---|
committer | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2016-06-24 15:22:22 +0600 |
commit | 75cca15c6513da5ef8da1117160e882b0f0f1c1b (patch) | |
tree | e615655f71da282c2663cf6dc09939b4c5747b27 /compiler/sigmatch.nim | |
parent | 764668d099a67ef6b877d07e4857c92d5774fe98 (diff) | |
download | Nim-75cca15c6513da5ef8da1117160e882b0f0f1c1b.tar.gz |
Speedup generic relations detection
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 acbf7d426..ed5dd6ca1 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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: |