summaryrefslogblamecommitdiff
path: root/test/files/neg/nonlocal-warning.check
blob: 67b3b10095f930916359ade5263db5953435427b (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                                                                         







                                                                                             
nonlocal-warning.scala:4: warning: This catches all Throwables, which often has undesirable consequences.
If intentional, 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