Skip to content

Commit

Permalink
Added so JuliaLang#7714 also takes care of args... when considering a…
Browse files Browse the repository at this point in the history
… match.
  • Loading branch information
dhoegh committed Dec 27, 2014
1 parent 9d0b866 commit f1b674a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions base/replutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,18 @@ function showerror(io::IO, e::MethodError)
end
buf = IOBuffer()
print(buf, " $(e.f.env.name)(")
first = true
T = nothing
right_matches = 0
for (arg, sigtype) in Zip2{Any,Any}(e.args, method.sig)
if first
first = false
else
for (i, (arg, sigtype)) in enumerate(Zip2{Any,Any}(e.args, method.sig))
if i != 1
print(buf, ", ")
end
if typeof(arg) <: sigtype
right_matches += 1
print(buf, "::$(sigtype)")
elseif (Any...,) == (sigtype,)
right_matches += length(typeargs) - i
print(buf, "::$(sigtype)")
else
Base.with_output_color(:red, buf) do buf
print(buf, "::$(sigtype)")
Expand Down

0 comments on commit f1b674a

Please sign in to comment.