Skip to content

Wrong number of methods after redefinition of function #53814

Closed
@giordano

Description

@giordano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions