diff options
Diffstat (limited to 'tests/untried/neg/nonlocal-warning.check')
-rw-r--r-- | tests/untried/neg/nonlocal-warning.check | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/untried/neg/nonlocal-warning.check b/tests/untried/neg/nonlocal-warning.check new file mode 100644 index 000000000..5202df655 --- /dev/null +++ b/tests/untried/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 |