From 9f186355fca4610024f5754125262943422b2640 Mon Sep 17 00:00:00 2001 From: Isaiah Norton Date: Wed, 18 Jan 2017 23:28:02 -0500 Subject: [PATCH] Fix #20108 fix #20111: method display errors --- base/methodshow.jl | 2 +- base/replutil.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/base/methodshow.jl b/base/methodshow.jl index f9bf78f514907f..269a1dfeb89cc9 100644 --- a/base/methodshow.jl +++ b/base/methodshow.jl @@ -87,7 +87,7 @@ end function show(io::IO, m::Method; kwtype::Nullable{DataType}=Nullable{DataType}()) tv, decls, file, line = arg_decl_parts(m) sig = unwrap_unionall(m.sig) - ft = sig.parameters[1] + ft = unwrap_unionall(sig.parameters[1]) d1 = decls[1] if sig === Tuple print(io, m.name) diff --git a/base/replutil.jl b/base/replutil.jl index 57b24b99771a58..b2002eef8d224f 100644 --- a/base/replutil.jl +++ b/base/replutil.jl @@ -515,6 +515,7 @@ function show_method_candidates(io::IO, ex::MethodError, kwargs::Vector=Any[]) # If the methods args is longer than input then the method # arguments is printed as not a match for (k, sigtype) in enumerate(sig[length(t_i)+1:end]) + sigtype = unwrap_unionall(sigtype) if Base.isvarargtype(sigtype) sigstr = string(sigtype.parameters[1], "...") else