diff options
Diffstat (limited to 'tests/untried/pos/t1048.scala')
-rw-r--r-- | tests/untried/pos/t1048.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/untried/pos/t1048.scala b/tests/untried/pos/t1048.scala new file mode 100644 index 000000000..cd16db5b6 --- /dev/null +++ b/tests/untried/pos/t1048.scala @@ -0,0 +1,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(_)) => () + } +} + |