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.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/pos/tryTyping.scala b/tests/pos/tryTyping.scala
new file mode 100644
index 000000000..35180bee9
--- /dev/null
+++ b/tests/pos/tryTyping.scala
@@ -0,0 +1,14 @@
+object tryTyping{
+ def foo: Int = {
+ try{???; 1}
+ catch {
+ case e: Exception => 2
+ }
+ }
+
+ def foo2: Int = {
+ val a: (Throwable => Int) = _ match {case _ => 2}
+ try{???; 1}
+ catch a
+ }
+} \ No newline at end of file