aboutsummaryrefslogtreecommitdiff
path: root/tests/pickling/tryTyping.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pickling/tryTyping.scala')
-rw-r--r--tests/pickling/tryTyping.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pickling/tryTyping.scala b/tests/pickling/tryTyping.scala
new file mode 100644
index 000000000..a2aeb17c8
--- /dev/null
+++ b/tests/pickling/tryTyping.scala
@@ -0,0 +1,20 @@
+object tryTyping{
+ def foo: Int = {
+ try{???; 1}
+ catch {
+ case e: Exception => 2
+ }
+ }
+
+ def foo2: Int = {
+ val a2: (Throwable => Int) = _ match {case _ => 2}
+ try{???; 1}
+ 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