aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tryTyping.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/tryTyping.scala')
-rw-r--r--tests/pos/tryTyping.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/pos/tryTyping.scala b/tests/pos/tryTyping.scala
index 35180bee9..a2aeb17c8 100644
--- a/tests/pos/tryTyping.scala
+++ b/tests/pos/tryTyping.scala
@@ -7,8 +7,14 @@ object tryTyping{
}
def foo2: Int = {
- val a: (Throwable => Int) = _ match {case _ => 2}
+ val a2: (Throwable => Int) = _ match {case _ => 2}
try{???; 1}
- catch a
+ catch a2
+ }
+
+ def foo3: Int = {
+ val a3: (Int => Throwable => Int) = (b: Int) => _ match {case _ => b}
+ try{???; 1}
+ catch a3(3)
}
} \ No newline at end of file