summaryrefslogtreecommitdiff
path: root/test/files/neg/main1.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/main1.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/main1.check')
-rw-r--r--test/files/neg/main1.check14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/files/neg/main1.check b/test/files/neg/main1.check
index 1a7a13e1e9..b745105818 100644
--- a/test/files/neg/main1.check
+++ b/test/files/neg/main1.check
@@ -1,26 +1,28 @@
-main1.scala:3: error: Foo has a main method with parameter type Array[String], but foo1.Foo will not be a runnable program.
+main1.scala:3: warning: Foo has a main method with parameter type Array[String], but foo1.Foo will not be a runnable program.
Reason: companion is a trait, which means no static forwarder can be generated.
object Foo { // companion is trait
^
-main1.scala:10: error: Foo has a main method with parameter type Array[String], but foo2.Foo will not be a runnable program.
+main1.scala:10: warning: Foo has a main method with parameter type Array[String], but foo2.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo { // companion has its own main
^
-main1.scala:22: error: Foo has a main method with parameter type Array[String], but foo3.Foo will not be a runnable program.
+main1.scala:22: warning: Foo has a main method with parameter type Array[String], but foo3.Foo will not be a runnable program.
Reason: companion contains its own main method (implementation restriction: no main is allowed, regardless of signature), which means no static forwarder can be generated.
object Foo { // Companion contains main, but not an interfering main.
^
-main1.scala:31: error: Foo has a main method with parameter type Array[String], but foo4.Foo will not be a runnable program.
+main1.scala:31: warning: Foo has a main method with parameter type Array[String], but foo4.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo extends Foo { // Inherits main from the class
^
-main1.scala:39: error: Foo has a main method with parameter type Array[String], but foo5.Foo will not be a runnable program.
+main1.scala:39: warning: Foo has a main method with parameter type Array[String], but foo5.Foo will not be a runnable program.
Reason: companion contains its own main method, which means no static forwarder can be generated.
object Foo extends Foo { // Overrides main from the class
^
-5 errors found
+error: No warnings can be incurred under -Xfatal-warnings.
+5 warnings found
+one error found