summaryrefslogtreecommitdiff
path: root/test/files/neg/patmatexhaust.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-08-10 07:29:31 -0700
committerPaul Phillips <paulp@improving.org>2012-08-10 12:28:50 -0700
commitfbbbb2294680c0f57506f885971b148cae53c92d (patch)
treed2500556943fd4a63cad5752a0aa5a0caf3b329d /test/files/neg/patmatexhaust.check
parent7dd0ead39ceb7cd6f445d86f37c68b78218eef57 (diff)
downloadscala-fbbbb2294680c0f57506f885971b148cae53c92d.tar.gz
scala-fbbbb2294680c0f57506f885971b148cae53c92d.tar.bz2
scala-fbbbb2294680c0f57506f885971b148cae53c92d.zip
Made -Xfatal-warnings less immediately fatal.
Instead of changing warnings to errors mid-stream, at the end of a run I check for condition "no errors, some warnings, and fatal warnings" and then generate an error at that point. This is necessary to test for some warnings which come from later stages.
Diffstat (limited to 'test/files/neg/patmatexhaust.check')
-rw-r--r--test/files/neg/patmatexhaust.check24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/files/neg/patmatexhaust.check b/test/files/neg/patmatexhaust.check
index 4556e6622f..6069dfdaab 100644
--- a/test/files/neg/patmatexhaust.check
+++ b/test/files/neg/patmatexhaust.check
@@ -1,40 +1,42 @@
-patmatexhaust.scala:7: error: match may not be exhaustive.
+patmatexhaust.scala:7: warning: match may not be exhaustive.
It would fail on the following input: Baz
def ma1(x:Foo) = x match {
^
-patmatexhaust.scala:11: error: match may not be exhaustive.
+patmatexhaust.scala:11: warning: match may not be exhaustive.
It would fail on the following input: Bar(_)
def ma2(x:Foo) = x match {
^
-patmatexhaust.scala:23: error: match may not be exhaustive.
+patmatexhaust.scala:23: warning: match may not be exhaustive.
It would fail on the following inputs: (Kult(_), Kult(_)), (Qult(), Qult())
def ma3(x:Mult) = (x,x) match { // not exhaustive
^
-patmatexhaust.scala:49: error: match may not be exhaustive.
+patmatexhaust.scala:49: warning: match may not be exhaustive.
It would fail on the following inputs: Gp(), Gu
def ma4(x:Deep) = x match { // missing cases: Gu, Gp
^
-patmatexhaust.scala:55: error: unreachable code
+patmatexhaust.scala:55: warning: unreachable code
case _ if 1 == 0 =>
^
-patmatexhaust.scala:53: error: match may not be exhaustive.
+patmatexhaust.scala:53: warning: match may not be exhaustive.
It would fail on the following input: Gp()
def ma5(x:Deep) = x match {
^
-patmatexhaust.scala:75: error: match may not be exhaustive.
+patmatexhaust.scala:75: warning: match may not be exhaustive.
It would fail on the following input: B()
def ma9(x: B) = x match {
^
-patmatexhaust.scala:100: error: match may not be exhaustive.
+patmatexhaust.scala:100: warning: match may not be exhaustive.
It would fail on the following input: C1()
def ma10(x: C) = x match { // not exhaustive: C1 is not sealed.
^
-patmatexhaust.scala:114: error: match may not be exhaustive.
+patmatexhaust.scala:114: warning: match may not be exhaustive.
It would fail on the following inputs: D1, D2()
def ma10(x: C) = x match { // not exhaustive: C1 has subclasses.
^
-patmatexhaust.scala:126: error: match may not be exhaustive.
+patmatexhaust.scala:126: warning: match may not be exhaustive.
It would fail on the following input: C1()
def ma10(x: C) = x match { // not exhaustive: C1 is not abstract.
^
-10 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+10 warnings found
+one error found