summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2019-04-27 14:31:05 +0100
committerGitHub <noreply@github.com>2019-04-27 14:31:05 +0100
commitda3b649539c856fb9126d28f4354bf0170b363ad (patch)
tree9154773da9ab62213cfce0091c155d72bdcfeb8b
parent98002149a8a5521ba8bd3f51fe5c50206ee7f0f1 (diff)
downloadNim-da3b649539c856fb9126d28f4354bf0170b363ad.tar.gz
bug fix in sym body hash (#11127)
-rw-r--r--compiler/sighashes.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim
index 8e4458942..c69d58cd3 100644
--- a/compiler/sighashes.nim
+++ b/compiler/sighashes.nim
@@ -349,7 +349,7 @@ proc hashBodyTree(graph: ModuleGraph, c: var MD5Context, n: PNode) =
     c &= n.strVal
   else:
     for i in 0..<n.len:
-      hashTree(c, n.sons[i])
+      hashBodyTree(graph, c, n.sons[i])
 
 proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash =
   ## compute unique digest of the proc/func/method symbols
@@ -369,7 +369,7 @@ proc symBodyDigest*(graph: ModuleGraph, sym: PSym): SigHash =
   if sym.ast != nil:
     md5Init(c)
     c.md5Update(cast[cstring](result.addr), sizeof(result))
-    c.hashTree(sym.ast[bodyPos])
+    hashBodyTree(graph, c, sym.ast[bodyPos])
     c.md5Final(result.Md5Digest)
     graph.symBodyHashes[sym.id] = result