diff options
Diffstat (limited to 'tests/neg/t1048.scala')
-rw-r--r-- | tests/neg/t1048.scala | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/neg/t1048.scala b/tests/neg/t1048.scala deleted file mode 100644 index 4b8e78b4c..000000000 --- a/tests/neg/t1048.scala +++ /dev/null @@ -1,21 +0,0 @@ -trait T[U] { - def x: T[_ <: U] -} - -object T { - def unapply[U](t: T[U]): Option[T[_ <: U]] = Some(t.x) -} - -object Test { - def f[W](t: T[W]) = t match { - case T(T(_)) => () -// Gives: -// t1048.scala:11: error: There is no best instantiation of pattern type T[Any'] -// that makes it a subtype of selector type T[_ <: W]. -// Non-variant type variable U cannot be uniquely instantiated. -// case T(T(_)) => () -// ^ -// one error found - } -} - |