-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old method incorrectly called after redefining it #25252
Comments
cc @vtjnash |
I've seen something like this before too but never tracked down a reproducer. Awesome work, @nalimilan. |
Yeah, when I started to have serious doubts about the fact that I wasn't just mad, but that something weird was going on, I thought it was probably worth reporting, since it's not that common to be able to reproduce this kind of thing. The fact that I identified the problem is an indication of the hard time I had getting the hashing algorithm to work (and of my lazy trial-and-error approach :-p). |
This doesn't repro anymore and a lot of things have changed since the issue opened. Please reopen if this can be reproduced some other way. |
I've experienced a weird bug when working on #16401. When debugging the
hash(::AbstractArray, ::UInt)
method, I repeatedly pasted it in the REPL and calledhash(::AbstractArray)
. It turns out that under some circumstances, the redefinition has no effect: the old method is still used.I've been able to reproduce the problem with relatively simple steps:
import Base: hash, hash_range, TypeRangeStep, RangeStepRegular, hashaa_seed, hashr_seed, hashrle_seed
println(1)
at the top of the functionhash([1])
and check that it prints1
using Test; include("test/hashing.jl")
println
callhash([1])
and observe that it still prints1
If you skip step 4, the call in the last step prints
2
as expected.The text was updated successfully, but these errors were encountered: