Compiler version
3.7.2 but works on 3.7.1 and 3.7.0
Minimized code
object Test {
sealed trait E[T]
case object A extends E[Int]
final case class I[T, I <: Iterable[T]]() extends E[I]
def test[T](a: E[T]): Unit = {
a match {
case A | I() => ???
}
}
}
Output
-- [E057] Type Mismatch Error: i22879_modified.scala:8:15 ---------
8 | case A | I() => ???
| ^
| Type argument T does not conform to upper bound Iterable[T$1]
|
| longer explanation available when compiling with `-explain`
1 error found
Expectation
No warnings should be produced. Matching on A and I() it separate case works.