Fix compiler crash (#6773) (#6774)

This commit is contained in:
cooldome 2017-11-18 08:21:37 +00:00 • committed by Andreas Rumpf
commit 8443e3f6be
2 changed files with 48 additions and 1 deletions

View file

@ -1613,7 +1613,7 @@ 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:
elif aOrig.n != nil and aOrig.n.typ != nil:
result = typeRel(c, f.lastSon, aOrig.n.typ)
if result != isNone:
var boundType = newTypeWithSons(c.c, tyStatic, @[aOrig.n.typ])