Fix for KT-15726: Kotlin can't compile nested try-catch with return
#KT-15726 Fixed
This commit is contained in:
@@ -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"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@kotlin.Metadata
|
||||
public final class Kt15726Kt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static method nyCompiler(): void
|
||||
public final static method nyCompiler2(): void
|
||||
}
|
||||
Reference in New Issue
Block a user