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:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user