blob: 7bd61a2a4d98e8a6b867b0b71543ef4b0450beaf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
class A {
def f(x: Any) = x match {
case xs: List[String @unchecked] => xs.head // okay
case xs: Set[Int] => xs.head // unchecked
case xs: Map[String @unchecked, String] => xs.head // one unchecked, one okay
case f: ((Int @unchecked) => (Int @unchecked)) => f(5) // okay
case f: ((Int, Int) => Int) => // unchecked
case _ => ""
}
}
|