From b197197a51cb1d4eea5c3e3fed0ae3419449a6d6 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Tue, 24 Oct 2023 03:11:54 -0500 Subject: [PATCH] Fix typo in range display (#51832) Thanks ScottPJones for finding this. Co-authored-by: Lilith Hafner --- base/range.jl | 2 +- test/ranges.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 13a8bd2701ae5..d3be5b8931015 100644 --- a/base/range.jl +++ b/base/range.jl @@ -597,7 +597,7 @@ function show(io::IO, r::LinRange{T}) where {T} print(io, "LinRange{") show(io, T) print(io, "}(") - ioc = IOContext(io, :typeinto=>T) + ioc = IOContext(io, :typeinfo=>T) show(ioc, first(r)) print(io, ", ") show(ioc, last(r)) diff --git a/test/ranges.jl b/test/ranges.jl index 4f88d991181db..2176e0cae7247 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1286,6 +1286,8 @@ end @test sprint(show, UnitRange(1, 2)) == "1:2" @test sprint(show, StepRange(1, 2, 5)) == "1:2:5" + + @test sprint(show, LinRange{Float32}(1.5, 2.5, 10)) == "LinRange{Float32}(1.5, 2.5, 10)" end @testset "Issue 11049, and related" begin