diff options
Diffstat (limited to 'test/files/run/virtpatmat_try.scala')
-rw-r--r-- | test/files/run/virtpatmat_try.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/virtpatmat_try.scala b/test/files/run/virtpatmat_try.scala index 46e67cb72e..dab2c89227 100644 --- a/test/files/run/virtpatmat_try.scala +++ b/test/files/run/virtpatmat_try.scala @@ -8,7 +8,7 @@ object Test extends App { } catch { // this should emit a "catch-switch" case y: A => println(y.x) case (_ : A | _ : B) => println("B") - case _ => println("other") + case _: Throwable => println("other") } try { @@ -17,7 +17,7 @@ object Test extends App { // case A(x) => println(x) case y: A => println(y.x) case x@((_ : A) | (_ : B)) => println(x) - case _ => println("other") + case _: Throwable => println("other") } def simpleTry { @@ -34,7 +34,7 @@ object Test extends App { } def wildcardTry { - try { bla } catch { case _ => bla } + try { bla } catch { case _: Throwable => bla } } def tryPlusFinally { @@ -44,4 +44,4 @@ object Test extends App { def catchAndPassToLambda { try { bla } catch { case ex: Exception => val f = () => ex } } -}
\ No newline at end of file +} |