Closed wheeheee closed 2 years ago
I can't reproduce this now:
julia> @enter hash(x, h)
In hash(x, h) at /home/kc/.julia/packages/InlineStrings/VHH4L/src/InlineStrings.jl:289
289 function Base.hash(x::T, h::UInt) where {T <: InlineString}
>290 h += Base.memhash_seed
291 ref = Ref{T}(_bswap(x))
292 return ccall(Base.memhash, UInt,
293 (Ref{T}, Csize_t, UInt32),
294 ref, sizeof(x), h % UInt32) + h
295 end
About to run: (+)(0x0000000000000000, 0x71e729fd56419c81)
1|debug> c
0xfa232f94411b00cd
so I will guess this is fixed. Please comment if it is still bad for you.
The hash function
Base.hash(x::T, h::UInt)
from InlineStrings.jl works fine when run normally but@enter hash(x, h)
throws aTypeError
.Stepping through, I get this
Also, without
@enter
, this ccall doesn't errorbut with
@enter
but when I wrap it with a function it's ok.
but
f(x::T, h::UInt) where T <: InlineString = ccall(Base.memhash, UInt, (Ref{T}, UInt, UInt32), Ref{T}(_bswap(x)), sizeof(x), h % UInt32)
throws the sameTypeError
as above regardless.