You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectTest {
sealedtraitE[T]
finalcaseclassI[T, I<:Iterable[T]]() extendsE[I]
deftest[T](a: E[T]):Unit= {
a match {
caseI() =>???
}
}
}
Output
-- [E057] Type Mismatch Error: match_bound.scala:7:11 ----------------------------------------
7 | case I() => ???
| ^
| Type argument T does not conform to upper bound Iterable[T$1]
|
| where: T is a type in method test with bounds <: Iterable[T²]
|
| longer explanation available when compiling with `-explain`
1 error found