From 0302ad4a641a07d1491cb22faa4494bd7d407d76 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Wed, 17 Jul 2019 16:39:48 -0700 Subject: [PATCH] fix nim script test --- lib/pure/hashes.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index 989944efbabf..f513e726298c 100644 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -130,8 +130,9 @@ proc hash*(x: pointer): Hash {.inline.} = } """ else: - # bugfix #11764: s/cast[Hash]/hash/ - result = hash(cast[uint](x) shr 3) # skip the alignment + # 2 bug fixes: s/cast[Hash]()/hash()/ (#11764); and also s/uint/BiggestInt/ + # note that we can't use unsigned because nimscript doesn't have `$`(uint) + result = hash(cast[ByteAddress](x) shr 3) # skip the alignment # CHECKME: why? isn't that responsability of caller if he needs this behavior? when not defined(booting):