Skip to content

to(collection.IndexedSeq) should not create a new collection if the source collection is a collection.IndexedSeq #11868

Closed
@Atry

Description

@Atry
Welcome to Scala 2.13.1 (OpenJDK 64-Bit Server VM, Java 11.0.1).
Type in expressions for evaluation. Or try :help.

scala> val s = Array(1): collection.IndexedSeq[Int]
s: scala.collection.IndexedSeq[Int] = ArraySeq(1)

scala> s.to(collection.IndexedSeq) eq s // should be true
res0: Boolean = false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions