even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -232,10 +232,7 @@ proc reprAux(result: var string, p: pointer, typ: PNimType,
|
|||
of tyString:
|
||||
var fp: int
|
||||
{. emit: "`fp` = `p`;\n" .}
|
||||
if cast[string](fp).isNil:
|
||||
add(result, "nil")
|
||||
else:
|
||||
add( result, reprStr(cast[string](p)) )
|
||||
add( result, reprStr(cast[string](p)) )
|
||||
of tyCString:
|
||||
var fp: cstring
|
||||
{. emit: "`fp` = `p`;\n" .}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue