Fix for KT-15726: Kotlin can't compile nested try-catch with return

#KT-15726 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-01-26 16:33:08 +01:00
parent 2c1c3d1f31
commit ab464ea86e
7 changed files with 58 additions and 0 deletions
@@ -0,0 +1,26 @@
fun nyCompiler() {
try {
return
}
catch (e: Exception) {}
finally {
try {} catch (e: Exception) {}
}
}
fun nyCompiler2() {
try {
return
}
finally {
try {} catch (e: Exception) {}
}
}
fun box(): String {
nyCompiler()
nyCompiler2()
return "OK"
}