blob: cd16db5b60cda4b82a962712be4308f8f6c8f163 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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(_)) => ()
}
}
|