Closed lrytz closed 1 year ago
Hmm, probably that's by design, to
can return the same instance for immutable collections, but is otherwise supposed to create a copy.
scala> val s = mutable.ArraySeq(1,2,3)
val s: scala.collection.mutable.ArraySeq[Int] = ArraySeq(1, 2, 3)
scala> s.to(mutable.Seq) eq s
val res1: Boolean = false
Pretty sure there was a design discussion about this in not the too distant past, though I don't recall what the outcome was. I can dig for it later. cc @scala/collections
Also let's check and make sure that the Scaladoc is totally explicit on this point.