bugfix: don't treat generic types with different static params as the same type

This commit is contained in:
Zahary Karadjov 2014-12-31 04:20:32 +02:00
commit 13e07f5d66
2 changed files with 20 additions and 0 deletions

View file

@ -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