JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
interface IFoo {
|
||||
fun foo(a: String): String =
|
||||
bar() + a
|
||||
|
||||
fun bar(): String
|
||||
}
|
||||
|
||||
suspend fun suspendK(a: String) =
|
||||
a + "K"
|
||||
|
||||
class FooImpl : IFoo {
|
||||
suspend fun test(a: String): String =
|
||||
super<IFoo>.foo(suspendK(a))
|
||||
|
||||
override fun bar(): String = "O"
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "FAIL"
|
||||
builder {
|
||||
result = FooImpl().test("")
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user