Skip to content

Long types printed in MethodError #50803

Closed
@timholy

Description

@timholy

As reported in https://discourse.julialang.org/t/type-parameter-display-in-1-10-for-methoderror/102516

a = view(reinterpret(reshape, UInt8, PermutedDimsArray(rand(5, 7), (2, 1))), 2:3, 2:4, 1:4); # a mildly-complex type
function foo end

julia> foo(a, a, a, a, a, a, a)
ERROR: MethodError: no method matching foo(::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{UInt8, 3, Base.ReinterpretArray{UInt8, 3, Float64, PermutedDimsArray{Float64, 2, (2, 1), (2, 1), Matrix{Float64}}, true}, Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}, false})
Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesBetter, more actionable error messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions