summaryrefslogtreecommitdiff
path: root/test/files/neg/nonlocal-warning.check
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/nonlocal-warning.check')
-rw-r--r--test/files/neg/nonlocal-warning.check9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/nonlocal-warning.check b/test/files/neg/nonlocal-warning.check
new file mode 100644
index 0000000000..5202df655a
--- /dev/null
+++ b/test/files/neg/nonlocal-warning.check
@@ -0,0 +1,9 @@
+nonlocal-warning.scala:4: warning: This catches all Throwables. If this is really intended, use `case x : Throwable` to clear this warning.
+ catch { case x => 11 }
+ ^
+nonlocal-warning.scala:2: warning: catch block may intercept non-local return from method foo
+ def foo(l: List[Int]): Int = {
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+two warnings found
+one error found