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/treetab.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/treetab.nim') diff --git a/compiler/treetab.nim b/compiler/treetab.nim index e6eb8c666..f15974f61 100644 --- a/compiler/treetab.nim +++ b/compiler/treetab.nim @@ -29,8 +29,7 @@ proc hashTree(n: PNode): Hash = if (n.floatVal >= - 1000000.0) and (n.floatVal <= 1000000.0): result = result !& toInt(n.floatVal) of nkStrLit..nkTripleStrLit: - if not n.strVal.isNil: - result = result !& hash(n.strVal) + result = result !& hash(n.strVal) else: for i in countup(0, sonsLen(n) - 1): result = result !& hashTree(n.sons[i]) -- cgit 1.4.1-2-gfad0