Skip to content

Commit afdc589

Browse files
LilithHafnerLilith Hafner
andauthored
Don't show redundant typeinfo when printing LinRange (#47509)
* Don't show redundant typeinfo when printing LinRange Co-authored-by: Lilith Hafner <Lilith.Hafner@gmail.com>
1 parent 4e58d88 commit afdc589

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

base/range.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,10 @@ function show(io::IO, r::LinRange{T}) where {T}
585585
print(io, "LinRange{")
586586
show(io, T)
587587
print(io, "}(")
588-
show(io, first(r))
588+
ioc = IOContext(io, :typeinfo=>T)
589+
show(ioc, first(r))
589590
print(io, ", ")
590-
show(io, last(r))
591+
show(ioc, last(r))
591592
print(io, ", ")
592593
show(io, length(r))
593594
print(io, ')')

0 commit comments

Comments
 (0)