Skip to content

reordering method redefinitions leads to a different displayed method count #58766

Open
@nsajko

Description

@nsajko

One order leads to generic function with 2 methods:

julia> struct A end; struct B end

julia> function f(::A) end
f (generic function with 1 method)

julia> function f(::A) end
f (generic function with 1 method)

julia> function f(::B) end
f (generic function with 2 methods)

julia> function f(::B) end
f (generic function with 2 methods)

Another order leads to generic function with 4 methods:

julia> struct A end; struct B end

julia> function f(::A) end
f (generic function with 1 method)

julia> function f(::B) end
f (generic function with 2 methods)

julia> function f(::A) end
f (generic function with 3 methods)

julia> function f(::B) end
f (generic function with 4 methods)

xref #53814

Metadata

Metadata

Assignees

No one assigned

    Labels

    backport 1.12Change should be backported to release-1.12

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions