diff options
author | Araq <rumpf_a@web.de> | 2018-08-22 12:35:46 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-22 12:35:46 +0200 |
commit | 64517445ea2347f29d91de44fe46ff78a6f655ab (patch) | |
tree | 630493227c0d7c953da3b0af087615d1727829db /compiler/treetab.nim | |
parent | 9047c3f5821043a348e289335ff00b1147a34f88 (diff) | |
download | Nim-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.nim | 3 |
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]) |