From fbbbb2294680c0f57506f885971b148cae53c92d Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 10 Aug 2012 07:29:31 -0700 Subject: 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. --- test/files/neg/t5830.check | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/files/neg/t5830.check') diff --git a/test/files/neg/t5830.check b/test/files/neg/t5830.check index 726fac2a1e..58c3a1be38 100644 --- a/test/files/neg/t5830.check +++ b/test/files/neg/t5830.check @@ -1,7 +1,9 @@ -t5830.scala:6: error: unreachable code +t5830.scala:6: warning: unreachable code case 'a' => println("b") // unreachable ^ -t5830.scala:4: error: could not emit switch for @switch annotated match +t5830.scala:4: warning: could not emit switch for @switch annotated match def unreachable(ch: Char) = (ch: @switch) match { ^ -two errors found +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found +one error found -- cgit v1.2.3