summary refs log tree commit diff stats
path: root/compiler/sighashes.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-12-21 11:09:47 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-12-21 11:09:47 +0100
commit06a8d37f9a6e194351c58c6668df4a4e69c5f470 (patch)
tree057ca9511083296a56f5f67c076e358d794654ab /compiler/sighashes.nim
parentc166394024a1f985c08bd4143936112f0ec07e25 (diff)
downloadNim-06a8d37f9a6e194351c58c6668df4a4e69c5f470.tar.gz
fixes #5135
Diffstat (limited to 'compiler/sighashes.nim')
-rw-r--r--compiler/sighashes.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim
index e7737e44a..145d3ff5a 100644
--- a/compiler/sighashes.nim
+++ b/compiler/sighashes.nim
@@ -281,6 +281,11 @@ proc hashNonProc*(s: PSym): SigHash =
     c &= it.name.s
     c &= "."
     it = it.owner
+  # for bug #5135 we also take the position into account, but only
+  # for parameters, because who knows what else position dependency
+  # might cause:
+  if s.kind == skParam:
+    c &= s.position
   md5Final c, result.Md5Digest
 
 proc hashOwner*(s: PSym): SigHash =