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
Presumably it has even less chance of guessing the right type in f2 than it does in f1.
classD[-A]
objectTest {
deff1(x: D[IntwithString]) = x match {
case_: D[Int] =>1case_: D[String] =>2
}
// Correctly warns://// a.scala:5: warning: non variable type-argument Int in type pattern D[Int] is unchecked since it is eliminated by erasure// case _: D[Int] => 1// ^// a.scala:6: warning: non variable type-argument String in type pattern D[String] is unchecked since it is eliminated by erasure// case _: D[String] => 2// ^// two warnings founddeff2(x: D[D[Int] withD[String]]) = x match {
case_: D[D[Int]] =>1case_: D[D[String]] =>2
}
// No warnings!
}
The text was updated successfully, but these errors were encountered:
Presumably it has even less chance of guessing the right type in f2 than it does in f1.
The text was updated successfully, but these errors were encountered: