Closed
Description
As reported by @allanrenucci in #4245, the following code will get a warning saying Some[Int]
cannot be checked at runtime.
class Test {
def test[X <: Option[Int]](x: X) = x.isInstanceOf[Some[Int]]
}
Initial diagnosis shows that type inference somehow failed to infer a <: Int
, given Some[a] <: X
and X <: Option[Int]
.