Allow typeof(nil) as a return type

This commit is contained in:
Albert Safin 2019-08-31 09:46:13 +00:00
commit efe1bed82e
4 changed files with 8 additions and 2 deletions

View file

@ -155,6 +155,7 @@ proc mapType(conf: ConfigRef; typ: PType): TCTypeKind =
of tyNone, tyTyped: result = ctVoid
of tyBool: result = ctBool
of tyChar: result = ctChar
of tyNil: result = ctPtr
of tySet: result = mapSetType(conf, typ)
of tyOpenArray, tyArray, tyVarargs, tyUncheckedArray: result = ctArray
of tyObject, tyTuple: result = ctStruct