summary refs log tree commit diff stats
path: root/compiler/treetab.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-04-30 16:09:27 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-04-30 16:09:27 +0100
commit0be654efe11311fcf1200c0e7dba9ecd55fa5591 (patch)
tree7f55b6c5f467a7094fb0978841a08a9b1764f0c3 /compiler/treetab.nim
parent4e778f9aac184655135daaff6579ef4a553d225a (diff)
parentd9d5aa60b7df936ffe6149143c7202604f71465f (diff)
downloadNim-0be654efe11311fcf1200c0e7dba9ecd55fa5591.tar.gz
Merge branch 'devel'
Diffstat (limited to 'compiler/treetab.nim')
-rw-r--r--compiler/treetab.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/treetab.nim b/compiler/treetab.nim
index 63f3fc6e2..8d66d56c7 100644
--- a/compiler/treetab.nim
+++ b/compiler/treetab.nim
@@ -28,8 +28,9 @@ proc hashTree(n: PNode): THash =
   of nkFloatLit..nkFloat64Lit:
     if (n.floatVal >= - 1000000.0) and (n.floatVal <= 1000000.0): 
       result = result !& toInt(n.floatVal)
-  of nkStrLit..nkTripleStrLit: 
-    result = result !& hash(n.strVal)
+  of nkStrLit..nkTripleStrLit:
+    if not n.strVal.isNil:
+      result = result !& hash(n.strVal)
   else: 
     for i in countup(0, sonsLen(n) - 1): 
       result = result !& hashTree(n.sons[i])