You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>defiv= collection.mutable.IndexedSeq(1,2,3).view
iv: scala.collection.mutable.IndexedSeqView[Int,scala.collection.mutable.IndexedSeq[Int]]
scala> iv diff iv
java.lang.ClassCastException: scala.collection.SeqViewLike$$anon$1 cannot be cast to scala.collection.mutable.IndexedSeqView
... 32 elided
scala> iv intersect iv
java.lang.ClassCastException: scala.collection.SeqViewLike$$anon$1 cannot be cast to scala.collection.mutable.IndexedSeqView
... 32 elided
Problem is described in more detail in related issues #4190 and #6709. A sensible fix will cover them all. It's mostly SeqView's fault for .asInstanceOf[That]-ing without even checking cbf eq theCbfWeAreExpecting. (Relying on a bunch of manual overrides in IndexedSeqView is not a very good idea either.)
The text was updated successfully, but these errors were encountered:
scala> ArrayBuffer(1,2,3,4,5,6,7).view.sliding(2).forall(_.nonEmpty)
java.lang.ClassCastException: scala.collection.SeqViewLike$$anon$1 cannot be cast to scala.collection.mutable.IndexedSeqView
Welcome to Scala2.13.0-RC2 (OpenJDKGraalVMCE19.0.0, Java1.8.0_212).
Type in expressions for evaluation. Ortry:help.
scala> scala.collection.mutable.ArrayBuffer(1,2,3,4,5,6,7).view.sliding(2).forall(_.nonEmpty)
res0:Boolean=true
Problem is described in more detail in related issues #4190 and #6709. A sensible fix will cover them all. It's mostly SeqView's fault for .asInstanceOf[That]-ing without even checking cbf eq theCbfWeAreExpecting. (Relying on a bunch of manual overrides in IndexedSeqView is not a very good idea either.)
The text was updated successfully, but these errors were encountered: