LengthFieldFramer.apply in Scala 2.13 broken since Commit dc6680b

#971 · open · 0 comments

View on GitHub ↗

DieBauer

In https://github.com/twitter/finagle/commit/dc6680bdfa11f0f7f578715ab3b66a5633f384e5 a cast is added to prevent copying elements. In scala 2.12 this is allowed, but in scala 2.13 (with the new collections API) this is incompatible. ```scala import scala.collection.mutable.ArrayBuffer import scala.collection.immutable.IndexedSeq val f = new ArrayBuffer[Int] f.asInstanceOf[IndexedSeq[Int]] ``` fails with `java.lang.ClassCastException: class scala.collection.mutable.ArrayBuffer cannot be cast to class scala.collection.immutable.IndexedSeq (scala.collection.mutable.ArrayBuffer and scala.collection.immutable.IndexedSeq ` The builds of this commit also indicate that the 2.13 finagle-core fails since. It seems btw that no code paths hit this, but the unit tests fail.

Comments