Given the following code:
trait S { type T } case class A(t: Seq[String]) extends S { type T = Seq[String] }
I do not understand this compilation error: It seems that the evidence is not being used.
def f[S<:A, X](g: => Seq[X])(implicit ev: S#T =:= Seq[X]) = new A(g) <console>:50: error: type mismatch; found : Seq[X] required: Seq[String] def f[S<:A, X](g: => Seq[X])(implicit ev: S#T =:= Seq[X]) = new A(g)
source share