From 3510eeb4c99b6daa42a27d0f7d96be8af21067ac Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Fri, 11 Nov 2022 22:47:35 +0600 Subject: [PATCH] Don't show redundant typeinfo when printing LinRange (take 2) (#47521) --- base/range.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/range.jl b/base/range.jl index 80bd449b22b9f..9986fa6a21def 100644 --- a/base/range.jl +++ b/base/range.jl @@ -585,9 +585,10 @@ function show(io::IO, r::LinRange{T}) where {T} print(io, "LinRange{") show(io, T) print(io, "}(") - show(io, first(r)) + ioc = IOContext(io, :typeinto=>T) + show(ioc, first(r)) print(io, ", ") - show(io, last(r)) + show(ioc, last(r)) print(io, ", ") show(io, length(r)) print(io, ')')