Closed
Description
Pointed out by @DmytroMitin in the following post:
type Ext[S <: Seq[_]] = S match {
case Seq[t] => t
}
implicitly[Ext[Seq[Int]] =:= Int] // e.scala: Cannot prove that e.Ext[Seq[Int]] =:= Int
If I change the definition of Ext
as follow, the consequence will differ:
type Ext[S] = S match {
case Seq[t] => t
} // success!
type Ext[S <: Any] = S match {
case Seq[t] => t
} // success!
type Ext[S <: Seq[Any]] = S match {
case Seq[t] => t
} // same error