This commit is contained in:
Zahary Karadjov 2017-06-10 23:14:25 +03:00 • committed by Andreas Rumpf
commit 367d232351
3 changed files with 27 additions and 1 deletions

View file

@ -1578,6 +1578,12 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
if not exprStructuralEquivalent(f.n, aOrig.n):
result = isNone
if result != isNone: put(c, f, aOrig)
elif aOrig.n != nil:
result = typeRel(c, f.lastSon, aOrig.n.typ)
if result != isNone:
var boundType = newTypeWithSons(c.c, tyStatic, @[aOrig.n.typ])
boundType.n = aOrig.n
put(c, f, boundType)
else:
result = isNone
elif prev.kind == tyStatic: