Skip to content

Show of parameterized methods #10794

@mauro3

Description

@mauro3

Below example shows that the method display does not make it clear whether the function parameter T features in the Array parameter or not.

julia> f{T}(::Array, x::T) = 1
f (generic function with 1 method)

julia> f{T}(::Array{T}, x::T) = 1
f (generic function with 2 methods)

julia> methods(f)
#2 methods for generic function "f":
f{T}(::Array{T,N},x::T) at none:1
f{T}(::Array{T,N},x::T) at none:1

for instance in methods(call) it looks like a lot of them are parametrized on the first argument but are not.

Maybe display like this instead:

ulia> methods(f)
#2 methods for generic function "f":
f{T}(::Array{_,_},x::T) at none:1
f{T}(::Array{T,N},x::T) at none:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions