Regression in inferred return type for join
on simple iterator. #55389
Closed
Description
opened on Aug 6, 2024
julia> itr = ("foo" for _ in 1:100)
Base.Generator{UnitRange{Int64}, var"#1#2"}(var"#1#2"(), 1:100)
julia> @code_warntype join(itr)
MethodInstance for join(::Base.Generator{UnitRange{Int64}, var"#1#2"})
from join(iterator) @ Base strings/io.jl:374
Arguments
#self#::Core.Const(join)
iterator::Base.Generator{UnitRange{Int64}, var"#1#2"}
Body::Union{Base.AnnotatedString{String}, String}
This used to infer to String
.
Ref #54919.
Activity