Closed
Description
reproduction steps
using Scala 2.13.6 (and all before), the following works ( https://scastie.scala-lang.org/NkHsooECRGqIgttwtvkgMg )
trait Txn[T <: Txn[T]]
trait Universe[T <: Txn[T]]
object Ref {
def apply[A](init: A)(implicit om: OptManifest[A]): Ref[A] = ???
}
trait Ref[A]
trait Handler {
def all: Ref[Vector[Universe[_]]] = Ref(Vector.empty) // here
}
In Scala 2.13.7, the marked line produces an error
type arguments [_$1] do not conform to trait Universe's type parameter bounds [T <: Txn[T]]
def all: Ref[Vector[Universe[_]]] = Ref(Vector.empty)
This is somehow caused by the OptManifest
argument to the Ref
constructor. If I remove that implicit argument, it compiles again.