diff options
author | metagn <metagngn@gmail.com> | 2023-05-30 22:29:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 21:29:38 +0200 |
commit | 20446b437bd6c35006fab78ed5e3bdd6f8056774 (patch) | |
tree | 8b7b3535d9cb46d4d420a2f6a460033bfdce05ac /lib/pure/hashes.nim | |
parent | a9385a6b4ab0862512992b2adf75460cf0c4ce74 (diff) | |
download | Nim-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.nim | 2 |
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): |