KT-5863: Inlined try/catch/finally block with non-local return doesn't work properly

#KT-5863 Fixed
This commit is contained in:
Michael Bogdanov
2014-09-26 11:03:19 +04:00
parent bf368b2bc2
commit b3e075173b
5 changed files with 35 additions and 3 deletions
@@ -0,0 +1,9 @@
inline fun <R> performWithFinally(finally: () -> R) : R {
try {
throw RuntimeException("1")
} catch (e: RuntimeException) {
throw RuntimeException("2")
} finally {
return finally()
}
}