JVM IR: Handle suspend interface default methods with generic types (KT-45166)

This commit is contained in:
Steven Schäfer
2021-04-09 13:51:37 +02:00
committed by Alexander Udalov
parent 7d62f0b5aa
commit 7a9ff15d73
9 changed files with 67 additions and 11 deletions
@@ -0,0 +1,19 @@
// Corresponds to KT-45166, KT-45320, KT-45490, and KT-45954.
// WITH_RUNTIME
// WITH_COROUTINES
import helpers.*
import kotlin.coroutines.*
interface I<T> {
suspend fun f(x: T): String = "OK"
}
class C : I<String>
fun box(): String {
var result = "Fail"
suspend {
result = (C() as I<String>).f("Fail")
}.startCoroutine(EmptyContinuation)
return result
}