Skip to content

to(Seq) doesn't force a stream, where to[Seq] did #236

@martijnhoekstra

Description

@martijnhoekstra

In 2.13, a Stream#to(Seq) returns identity.

In 2.12, Stream#to[Seq] returns a Vector, as does Stream#to(Seq) with compat.

I would argue that's a progression, not a regression, but it does introduce a semantic, potentially breaking change, both in the face of serialization and termination, when the stream isn't forced.

special-casing the scalafix for Stream#to(Seq) to Stream#toVector would make this change safe and obvious. That could either be obviously wrong or obviously right, both is a win.

Arguably, the same should be done for any CC#to(Seq) where Seq <: CC <: Stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions