Skip to content

Regression in inferred return type for join on simple iterator. #55389

Closed
@KristofferC

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions