summary refs log tree commit diff stats
path: root/lib/pure/hashes.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-05-30 22:29:38 +0300
committerGitHub <noreply@github.com>2023-05-30 21:29:38 +0200
commit20446b437bd6c35006fab78ed5e3bdd6f8056774 (patch)
tree8b7b3535d9cb46d4d420a2f6a460033bfdce05ac /lib/pure/hashes.nim
parenta9385a6b4ab0862512992b2adf75460cf0c4ce74 (diff)
downloadNim-20446b437bd6c35006fab78ed5e3bdd6f8056774.tar.gz
make `proc` not implicitly convert to `pointer` with a preview define (#21953)
* test `proc` not converting to `pointer`

* ignore define for now to test

* remove cstring

* fixes, changelog
Diffstat (limited to 'lib/pure/hashes.nim')
-rw-r--r--lib/pure/hashes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index 8e5770a71..daa7f9366 100644
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -534,7 +534,7 @@ proc hash*[T: tuple | object | proc | iterator {.closure.}](x: T): Hash =
   when T is "closure":
     result = hash((rawProc(x), rawEnv(x)))
   elif T is (proc):
-    result = hash(pointer(x))
+    result = hash(cast[pointer](x))
   else:
     result = 0
     for f in fields(x):