Skip to content

Commit b83f9e0

Browse files
committed
omit type annotation for splat keyword argument
1 parent 5e6baf9 commit b83f9e0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

base/show.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,8 +2539,13 @@ function show_tuple_as_call(out::IO, name::Symbol, sig::Type;
25392539
first || print(io, ", ")
25402540
first = false
25412541
print_within_stacktrace(io, k; color=:light_black)
2542-
print(io, "::")
2543-
print_type_bicolor(io, t; use_color = get(io, :backtrace, false)::Bool)
2542+
if t == pairs(NamedTuple)
2543+
# omit type annotation for splat keyword argument
2544+
print(io, "...")
2545+
else
2546+
print(io, "::")
2547+
print_type_bicolor(io, t; use_color = get(io, :backtrace, false)::Bool)
2548+
end
25442549
end
25452550
end
25462551
print_within_stacktrace(io, ")", bold=true)

0 commit comments

Comments
 (0)