Fix for KT-8948: CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'foo' into

#KT-8948 Fixed
This commit is contained in:
Michael Bogdanov
2015-09-07 16:56:15 +03:00
parent 24252b64d0
commit 912111d237
7 changed files with 80 additions and 4 deletions
@@ -0,0 +1,13 @@
import test.*
fun box(): String {
foo {
try {
return "OK"
} catch(e: Exception) {
return "fail 1"
}
}
return "fail 2"
}
@@ -0,0 +1,9 @@
package test
inline fun foo(f: () -> Unit) {
try {
f()
}
finally {
}
}
@@ -0,0 +1,21 @@
import test.*
var p = "fail"
fun test() {
foo {
try {
p = "O"
return
} catch(e: Exception) {
return
} finally {
p += "K"
}
}
}
fun box(): String {
test()
return p
}
@@ -0,0 +1,10 @@
package test
inline fun foo(f: () -> Unit) {
try {
f()
}
finally {
1
}
}