Description
On latest master (52fc796) the number of methods for a function for which we redefine the same method multiple times increases steadily:
julia> f() = nothing
f (generic function with 1 method)
julia> f() = nothing
f (generic function with 2 methods)
julia> f() = nothing
f (generic function with 3 methods)
julia> methods(f)
# 3 methods for generic function "f" from Main:
[1] f()
@ REPL[1]:1
[2] f()
@ REPL[1]:1
[3] f()
@ REPL[1]:1
julia> length(methods(f)) == 1
false
length(methods(f))
would be a good test for the resolution of this bug, or for a bisection script (can't run it myself now). This doesn't happen in v1.10 nor v1.11, so it should be somewhat recent.