blob: ce57e723913a5b3b98ace1cac408fc1c098dc8a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
trait T[U] {
def x: T[V] forSome { type V <: U }
}
object T {
def unapply[U](t: T[U]): Option[T[V] forSome { type V <: U }] = Some(t.x)
}
object Test {
def f[W](t: T[W]) = t match {
case T(T(_)) => ()
}
}
|