From 0fabe5428095fcbeca225e4d44b57e7f9aef3476 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Thu, 15 Sep 2022 11:29:38 -0400 Subject: [PATCH] Help inference of uninferred callers of `read(::IO, ::Type{String})` (#46577) --- base/io.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/io.jl b/base/io.jl index 59bce5eb4de6d..c2d6ad592bf0c 100644 --- a/base/io.jl +++ b/base/io.jl @@ -1001,7 +1001,7 @@ function read(s::IO, nb::Integer = typemax(Int)) return resize!(b, nr) end -read(s::IO, ::Type{String}) = String(read(s)) +read(s::IO, ::Type{String}) = String(read(s)::Vector{UInt8}) read(s::IO, T::Type) = error("The IO stream does not support reading objects of type $T.") ## high-level iterator interfaces ##