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

@ -1600,6 +1600,8 @@ proc createVar(p: PProc, typ: PType, indirect: bool): Rope =
result = putToSeq("{}", indirect)
of tyBool:
result = putToSeq("false", indirect)
of tyNil:
result = putToSeq("null", indirect)
of tyArray:
let length = toInt(lengthOrd(p.config, t))
let e = elemType(t)