From 20446b437bd6c35006fab78ed5e3bdd6f8056774 Mon Sep 17 00:00:00 2001 From: metagn Date: Tue, 30 May 2023 22:29:38 +0300 Subject: 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 --- lib/pure/hashes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure/hashes.nim') 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): -- cgit 1.4.1-2-gfad0