From 5613295e61f4328f2caaa20dbc21c3a0ce4937ac Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 28 Oct 2014 11:57:36 +0100 Subject: Typer should leave inline exception handlers inline. --- tests/pos/tryTyping.scala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/pos/tryTyping.scala') 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 -- cgit v1.2.3