summary refs log tree commit diff stats
path: root/compiler/treetab.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-22 12:35:46 +0200
committerAraq <rumpf_a@web.de>2018-08-22 12:35:46 +0200
commit64517445ea2347f29d91de44fe46ff78a6f655ab (patch)
tree630493227c0d7c953da3b0af087615d1727829db /compiler/treetab.nim
parent9047c3f5821043a348e289335ff00b1147a34f88 (diff)
downloadNim-64517445ea2347f29d91de44fe46ff78a6f655ab.tar.gz
even more strict isNil handling for strings/seqs in order to detect bugs
Diffstat (limited to 'compiler/treetab.nim')
-rw-r--r--compiler/treetab.nim3
1 files changed, 1 insertions, 2 deletions
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])