blob: 52e167f3b8e00ee93c169197d1439358111ff555 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class Test {
val X: OnNext[Any] = null
def Y: OnNext[Any] = null
(null: Any) match {
case X() => () // allowed
case Y() => () // not allowed
case OnNext[Any]() => () // should *not* be allowed, but was.
}
}
class OnNext[+T] {
def unapply(x: Any) = false
}
|