summaryrefslogtreecommitdiff
path: root/test/files/run/pf-catch.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/pf-catch.scala')
-rw-r--r--test/files/run/pf-catch.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/run/pf-catch.scala b/test/files/run/pf-catch.scala
index ba0781fe89..dfe43dc750 100644
--- a/test/files/run/pf-catch.scala
+++ b/test/files/run/pf-catch.scala
@@ -1,3 +1,5 @@
+
+import scala.language.{ postfixOps }
object Test {
def shortName(x: AnyRef) = x.getClass.getName split '.' last
type Handler[+T] = PartialFunction[Throwable, T]
@@ -27,7 +29,7 @@ object Test {
def main(args: Array[String]): Unit = {
try f1
- catch { case x => println(shortName(x) + " slipped by.") }
+ catch { case x: Throwable => println(shortName(x) + " slipped by.") }
f2
}