JVM IR: Handle suspend interface default methods with generic types (KT-45166)
This commit is contained in:
committed by
Alexander Udalov
parent
7d62f0b5aa
commit
7a9ff15d73
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user