even more strict isNil handling for strings/seqs in order to detect bugs

This commit is contained in:
Araq 2018-08-22 12:35:46 +02:00
commit 64517445ea
36 changed files with 193 additions and 245 deletions

View file

@ -1609,7 +1609,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
n.sons[pragmasPos] = proto.ast.sons[pragmasPos]
if n.sons[namePos].kind != nkSym: internalError(c.config, n.info, "semProcAux")
n.sons[namePos].sym = proto
if importantComments(c.config) and not isNil(proto.ast.comment):
if importantComments(c.config) and proto.ast.comment.len > 0:
n.comment = proto.ast.comment
proto.ast = n # needed for code generation
popOwner(c)