diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-12-31 04:20:32 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-12-31 04:20:32 +0200 |
commit | 13e07f5d667c569355470a56e8a730ca8a1862e5 (patch) | |
tree | e3edd74b7e51aabcb0dea105f7e40cc2f6f1e3ca /compiler | |
parent | b83b1383fb7dc423a812b9a6de64b9155f36d407 (diff) | |
download | Nim-13e07f5d667c569355470a56e8a730ca8a1862e5.tar.gz |
bugfix: don't treat generic types with different static params as the same type
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index d7bf4fee9..b58818a29 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -979,6 +979,9 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation = of tyStatic: if aOrig.kind == tyStatic: result = typeRel(c, f.lastSon, a) + if result != isNone and f.n != nil: + if not exprStructuralEquivalent(f.n, a.n): + result = isNone if result != isNone: put(c.bindings, f, aOrig) else: result = isNone |