diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-05 15:34:37 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-05 15:34:37 +0000 |
commit | 7553e6901d52ace00bfcb670336c480766c8301c (patch) | |
tree | 720e9fa758661c6d5cc51340b4b693433d00d696 /test/files/neg/exhausting.check | |
parent | a4cf7b1ec5dade69b41e59469b9b3f65415b9822 (diff) | |
download | scala-7553e6901d52ace00bfcb670336c480766c8301c.tar.gz scala-7553e6901d52ace00bfcb670336c480766c8301c.tar.bz2 scala-7553e6901d52ace00bfcb670336c480766c8301c.zip |
Improves exhaustiveness analysis to not warn ab...
Improves exhaustiveness analysis to not warn about types which cannot
match due to nonconformant type parameters. Also, look at the different
warnings emitted in the test case based on the presence of a constraint.
Nifty! Closes #3683, no review.
Diffstat (limited to 'test/files/neg/exhausting.check')
-rw-r--r-- | test/files/neg/exhausting.check | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/files/neg/exhausting.check b/test/files/neg/exhausting.check index 6383a6eaca..d3f2251f79 100644 --- a/test/files/neg/exhausting.check +++ b/test/files/neg/exhausting.check @@ -14,11 +14,16 @@ missing combination Bar3 def fail3[T](x: Foo[T]) = x match { ^ exhausting.scala:31: error: match is not exhaustive! +missing combination Bar2 Bar2 + + def fail4[T <: AnyRef](xx: (Foo[T], Foo[T])) = xx match { + ^ +exhausting.scala:36: error: match is not exhaustive! missing combination Bar1 Bar2 missing combination Bar1 Bar3 missing combination Bar2 Bar1 missing combination Bar2 Bar2 - def fail4[T](xx: (Foo[T], Foo[T])) = xx match { + def fail5[T](xx: (Foo[T], Foo[T])) = xx match { ^ -four errors found +5 errors found |