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]
caseobjectAextendsE[Int]
finalcaseclassI[T, I<:Iterable[T]]() extendsE[I]
deftest[T](a: E[T]):Unit= {
a match {
caseA|I() =>???
}
}
}
Output
-- [E057] TypeMismatchError: i22879_modified.scala:8:15---------8|caseA|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.