JVM_IR: remove a suspend-related hack from BridgeLowering
`invoke` in suspend lambdas overrides FunctionN.invoke, so the refactored BridgeLowering already generates correct bridges there. All the hack does is break overrides of interface suspend methods.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
interface I1<A, B> {
|
||||
suspend fun f(a: A, b: B): String
|
||||
}
|
||||
|
||||
class C<A> : I1<A, String> {
|
||||
override suspend fun f(a: A, b: String): String = b
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "fail"
|
||||
suspend {
|
||||
result = (C<Unit>() as I1<Unit, String>).f(Unit, "OK")
|
||||
}.startCoroutine(EmptyContinuation)
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user