JVM IR: Use INVOKESPECIAL instead of INVOKEVIRTUAL for default private
suspend functions. #KT-26592
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// WITH_RUNTIME
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
interface Foo {
|
||||
private suspend fun test(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
suspend fun foo(): String {
|
||||
return test()
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(Continuation(EmptyCoroutineContext) {
|
||||
it.getOrThrow()
|
||||
})
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
|
||||
builder {
|
||||
val foo: Foo = object : Foo{}
|
||||
res = foo.foo()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user