correct comparisons for nil strings/seqs

This commit is contained in:
Andreas Rumpf 2018-04-28 15:13:44 +02:00
commit f64f9e50cc
7 changed files with 91 additions and 23 deletions

View file

@ -1553,6 +1553,7 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode =
result = newNodeIT(nkFloatLit, info, t)
of tyCString, tyString:
result = newNodeIT(nkStrLit, info, t)
result.strVal = ""
of tyVar, tyLent, tyPointer, tyPtr, tySequence, tyExpr,
tyStmt, tyTypeDesc, tyStatic, tyRef, tyNil:
result = newNodeIT(nkNilLit, info, t)