summaryrefslogtreecommitdiff
path: root/test/files/neg/catch-all.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-02 10:37:13 -0700
committerPaul Phillips <paulp@improving.org>2012-10-04 16:08:31 -0700
commitd7354838948be58b8045e1218a9c757d9b90df76 (patch)
treef034b77a430cb98fc6f5add55e645be28b0cf21e /test/files/neg/catch-all.check
parent1f99df2c66cb1933dd4db74aa872497a4e26975b (diff)
downloadscala-d7354838948be58b8045e1218a9c757d9b90df76.tar.gz
scala-d7354838948be58b8045e1218a9c757d9b90df76.tar.bz2
scala-d7354838948be58b8045e1218a9c757d9b90df76.zip
Fix for spurious warning.
Eliminates spurious "catch block may intercept non-local return" seen in recent builds of master. Unified some catch logic in TreeInfo, and removed some which never worked.
Diffstat (limited to 'test/files/neg/catch-all.check')
-rw-r--r--test/files/neg/catch-all.check9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/files/neg/catch-all.check b/test/files/neg/catch-all.check
index aaf51480c3..2d58dd99a8 100644
--- a/test/files/neg/catch-all.check
+++ b/test/files/neg/catch-all.check
@@ -1,10 +1,13 @@
-catch-all.scala:2: warning: This catches all Throwables. If this is really intended, use `case _ : Throwable` to clear this warning.
+catch-all.scala:2: warning: This catches all Throwables, which often has undesirable consequences.
+If intentional, use `case _ : Throwable` to clear this warning.
try { "warn" } catch { case _ => }
^
-catch-all.scala:4: warning: This catches all Throwables. If this is really intended, use `case x : Throwable` to clear this warning.
+catch-all.scala:4: warning: This catches all Throwables, which often has undesirable consequences.
+If intentional, use `case x : Throwable` to clear this warning.
try { "warn" } catch { case x => }
^
-catch-all.scala:6: warning: This catches all Throwables. If this is really intended, use `case x : Throwable` to clear this warning.
+catch-all.scala:6: warning: This catches all Throwables, which often has undesirable consequences.
+If intentional, use `case x : Throwable` to clear this warning.
try { "warn" } catch { case _: RuntimeException => ; case x => }
^
error: No warnings can be incurred under -Xfatal-warnings.