diff --git a/base/errorshow.jl b/base/errorshow.jl index 70ac8105feb21..83bdc95f8c055 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -296,6 +296,21 @@ function showerror(io::IO, ex::MethodError) if ft <: Function && isempty(ft.parameters) && _isself(ft) f_is_function = true end + print(io, "no method matching ") + show_signature_function(io, isa(f, Type) ? Type{f} : typeof(f)) + print(io, "(") + colors = Iterators.cycle((:default, :blue)) + for (i, (typ, color)) in enumerate(zip(arg_types_param, colors)) + printstyled(io, "::", typ; color) + i == length(arg_types_param) || print(io, ", ") + end + if !isempty(kwargs) + print(io, "; ") + for (i, (k, v)) in enumerate(kwargs) + print(io, k, "::", typeof(v)) + i == length(kwargs)::Int || print(io, ", ") + end + end if is_arg_types print(io, "no method matching invoke ") else