|
78 | 78 |
|
79 | 79 | # NOTE: second argument is deprecated and is no longer used |
80 | 80 | function kwarg_decl(m::Method, kwtype = nothing) |
81 | | - if m.sig !== Tuple # OpaqueClosure or Builtin |
| 81 | + if !(m.sig === Tuple || m.sig <: Tuple{Core.Builtin, Vararg}) # OpaqueClosure or Builtin |
82 | 82 | kwtype = typeof(Core.kwcall) |
83 | 83 | sig = rewrap_unionall(Tuple{kwtype, NamedTuple, (unwrap_unionall(m.sig)::DataType).parameters...}, m.sig) |
84 | 84 | kwli = ccall(:jl_methtable_lookup, Any, (Any, UInt), sig, get_world_counter()) |
@@ -216,8 +216,7 @@ show(io::IO, ::MIME"text/plain", m::Method; kwargs...) = show_method(io, m; kwar |
216 | 216 |
|
217 | 217 | function show_method(io::IO, m::Method; modulecolor = :light_black, digit_align_width = 1) |
218 | 218 | tv, decls, file, line = arg_decl_parts(m) |
219 | | - sig = unwrap_unionall(m.sig) |
220 | | - if sig === Tuple |
| 219 | + if m.sig <: Tuple{Core.Builtin, Vararg} |
221 | 220 | # Builtin |
222 | 221 | print(io, m.name, "(...)") |
223 | 222 | file = "none" |
|
420 | 419 | function show(io::IO, ::MIME"text/html", m::Method) |
421 | 420 | tv, decls, file, line = arg_decl_parts(m, true) |
422 | 421 | sig = unwrap_unionall(m.sig) |
423 | | - if sig === Tuple |
424 | | - # Builtin |
| 422 | + if sig <: Tuple{Core.Builtin, Vararg} |
425 | 423 | print(io, m.name, "(...) in ", parentmodule(m)) |
426 | 424 | return |
427 | 425 | end |
|
0 commit comments