Allow typeof(nil) as a return type
This commit is contained in:
parent
9ae0dd611f
commit
efe1bed82e
4 changed files with 8 additions and 2 deletions
|
|
@ -1310,7 +1310,7 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
|
|||
tyNone, tyForward, tyFromExpr:
|
||||
result = t
|
||||
of tyNil:
|
||||
if kind != skConst and kind != skParam: result = t
|
||||
if kind != skConst and kind != skParam and kind != skResult: result = t
|
||||
of tyString, tyBool, tyChar, tyEnum, tyInt..tyUInt64, tyCString, tyPointer:
|
||||
result = nil
|
||||
of tyOrdinal:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue