Skip to content

Commit 814a02a

Browse files
committed
workaround for nim script test
1 parent 71c17f0 commit 814a02a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/pure/hashes.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ proc hash*(x: pointer): Hash {.inline.} =
130130
}
131131
"""
132132
else:
133-
# bugfix #11764: s/cast[Hash]/hash/
134-
result = hash(cast[uint](x) shr 3) # skip the alignment
133+
# 2 bug fixes: s/cast[Hash]()/hash()/ (#11764); and also s/uint/BiggestInt/
134+
# note that we can't use unsigned because nimscript doesn't have `$`(uint)
135+
result = hash(cast[ByteAddress](x) shr 3) # skip the alignment
135136
# CHECKME: why? isn't that responsability of caller if he needs this behavior?
136137

137138
when not defined(booting):

0 commit comments

Comments
 (0)