changes how the now illegal 'string == nil' comparison is detected

This commit is contained in:
Andreas Rumpf 2018-08-15 16:31:56 +02:00
commit 0da91aa744
5 changed files with 12 additions and 7 deletions

View file

@ -1200,7 +1200,7 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
tyNone, tyForward, tyFromExpr:
result = t
of tyNil:
if kind != skConst: result = t
if kind != skConst and kind != skParam: result = t
of tyString, tyBool, tyChar, tyEnum, tyInt..tyUInt64, tyCString, tyPointer:
result = nil
of tyOrdinal: