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:
pyos
2020-02-18 10:59:09 +01:00
committed by Ilmir Usmanov
parent ba90e87756
commit 3080b4c435
8 changed files with 64 additions and 6 deletions
@@ -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
}