blob: d93fe706ad010247aaa832e52316fa59d5a3afb0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
class C {
// not a compile-time constant due to return type
final val K: Int = 20
def f(x: Int) = (x: @annotation.switch) match {
case K => 0
case 2 => 1
}
def g(x: Int) = (x: @annotation.switch) match {
case K => 0
case 2 => 1
case 3 => 2
}
}
|