diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-28 11:57:36 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-10-30 17:22:13 +0100 |
commit | 5613295e61f4328f2caaa20dbc21c3a0ce4937ac (patch) | |
tree | 5a67db31ac4258e78d32888ec5cc93d76e53ab7b /tests/pos | |
parent | 09c5ad4f92aab61053e70f2e6e863271c777dd14 (diff) | |
download | dotty-5613295e61f4328f2caaa20dbc21c3a0ce4937ac.tar.gz dotty-5613295e61f4328f2caaa20dbc21c3a0ce4937ac.tar.bz2 dotty-5613295e61f4328f2caaa20dbc21c3a0ce4937ac.zip |
Typer should leave inline exception handlers inline.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/tryTyping.scala | 10 |
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 |