aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/catch-all.check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/catch-all.check')
-rw-r--r--tests/untried/neg/catch-all.check12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/untried/neg/catch-all.check b/tests/untried/neg/catch-all.check
new file mode 100644
index 000000000..aaf51480c
--- /dev/null
+++ b/tests/untried/neg/catch-all.check
@@ -0,0 +1,12 @@
+catch-all.scala:2: warning: This catches all Throwables. If this is really intended, 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.
+ 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.
+ try { "warn" } catch { case _: RuntimeException => ; case x => }
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+three warnings found
+one error found