@@ -259,7 +259,7 @@ function showerror(io::IO, ex::MethodError)
259259 is_arg_types = ! isa (ex. args, Tuple)
260260 arg_types = is_arg_types ? ex. args : typesof (ex. args... )
261261 arg_types_param:: SimpleVector = (unwrap_unionall (arg_types):: DataType ). parameters
262- san_arg_types_param = Any[rewrap_unionall (a , arg_types) for a in arg_types_param]
262+ san_arg_types_param = Any[rewrap_unionall (arg_types_param[i] , arg_types) for i in 1 : length ( arg_types_param) ]
263263 f = ex. f
264264 meth = methods_including_ambiguous (f, arg_types)
265265 if isa (meth, MethodList) && length (meth) > 1
@@ -423,10 +423,10 @@ function showerror_ambiguous(io::IO, meths, f, args::Type)
423423 sigfix = typeintersect (m. sig, sigfix)
424424 end
425425 if isa (unwrap_unionall (sigfix), DataType) && sigfix <: Tuple
426- let sigfix= sigfix
427- if all (m-> morespecific (sigfix, m. sig), meths)
426+ let sigfix= Core . Box ( sigfix)
427+ if all (m-> morespecific (sigfix. contents , m. sig), meths)
428428 print (io, " \n Possible fix, define\n " )
429- show_tuple_as_call (io, :function , sigfix)
429+ show_tuple_as_call (io, :function , sigfix. contents )
430430 else
431431 print (io, " To resolve the ambiguity, try making one of the methods more specific, or " )
432432 print (io, " adding a new method more specific than any of the existing applicable methods." )
@@ -511,10 +511,10 @@ function show_method_candidates(io::IO, ex::MethodError, kwargs=[])
511511 # If isvarargtype then it checks whether the rest of the input arguments matches
512512 # the varargtype
513513 if Base. isvarargtype (sig[i])
514- sigstr = (unwrapva (unwrap_unionall (sig[i])), " ..." )
514+ sigstr = Core . svec (unwrapva (unwrap_unionall (sig[i])), " ..." )
515515 j = length (t_i)
516516 else
517- sigstr = (sig[i],)
517+ sigstr = Core . svec (sig[i],)
518518 j = i
519519 end
520520 # Checks if the type of arg 1:i of the input intersects with the current method
@@ -560,9 +560,9 @@ function show_method_candidates(io::IO, ex::MethodError, kwargs=[])
560560 for (k, sigtype) in enumerate (sig[length (t_i)+ 1 : end ])
561561 sigtype = isvarargtype (sigtype) ? unwrap_unionall (sigtype) : sigtype
562562 if Base. isvarargtype (sigtype)
563- sigstr = (unwrapva (sigtype:: Core.TypeofVararg ), " ..." )
563+ sigstr = Core . svec (unwrapva (sigtype:: Core.TypeofVararg ), " ..." )
564564 else
565- sigstr = (sigtype,)
565+ sigstr = Core . svec (sigtype,)
566566 end
567567 if ! ((min (length (t_i), length (sig)) == 0 ) && k== 1 )
568568 print (iob, " , " )
0 commit comments