improve error message for mismatched proc types

This commit is contained in:
Andreas Rumpf 2017-02-10 20:39:37 +01:00
commit 443a46b40d
2 changed files with 43 additions and 13 deletions

View file

@ -543,7 +543,7 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
else:
return isNone
when useEffectSystem:
if not compatibleEffects(f, a): return isNone
if compatibleEffects(f, a) != efCompat: return isNone
of tyNil:
result = f.allowsNil