diff options
Diffstat (limited to 'test/files/neg/exhausting.scala')
-rw-r--r-- | test/files/neg/exhausting.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/files/neg/exhausting.scala b/test/files/neg/exhausting.scala index 8b1ea817e4..0741d7467b 100644 --- a/test/files/neg/exhausting.scala +++ b/test/files/neg/exhausting.scala @@ -28,7 +28,12 @@ object Test { case Bar1 => "ok" case Bar2 => "ok" } - def fail4[T](xx: (Foo[T], Foo[T])) = xx match { + def fail4[T <: AnyRef](xx: (Foo[T], Foo[T])) = xx match { + case (Bar1, Bar1) => () + case (Bar2, Bar3) => () + case (Bar3, _) => () + } + def fail5[T](xx: (Foo[T], Foo[T])) = xx match { case (Bar1, Bar1) => () case (Bar2, Bar3) => () case (Bar3, _) => () |