From 64517445ea2347f29d91de44fe46ff78a6f655ab Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 22 Aug 2018 12:35:46 +0200 Subject: even more strict isNil handling for strings/seqs in order to detect bugs --- compiler/vmmarshal.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/vmmarshal.nim') diff --git a/compiler/vmmarshal.nim b/compiler/vmmarshal.nim index eb01b3514..149d2e08f 100644 --- a/compiler/vmmarshal.nim +++ b/compiler/vmmarshal.nim @@ -127,7 +127,7 @@ proc storeAny(s: var string; t: PType; a: PNode; stored: var IntSet; storeAny(s, t.lastSon, a, stored, conf) s.add("]") of tyString, tyCString: - if a.kind == nkNilLit or a.strVal.isNil: s.add("null") + if a.kind == nkNilLit: s.add("null") else: s.add(escapeJson(a.strVal)) of tyInt..tyInt64, tyUInt..tyUInt64: s.add($a.intVal) of tyFloat..tyFloat128: s.add($a.floatVal) -- cgit 1.4.1-2-gfad0