[JVM IR] Copy attributes for JVM_STATIC_WRAPPERS.
This commit is contained in:
committed by
Alexander Udalov
parent
3db5ba98ad
commit
d397efb2bd
@@ -0,0 +1,38 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun <T> suspendHere(x: T): T = suspendCoroutineUninterceptedOrReturn {
|
||||
it.resume(x)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
inline class I(val x: Any?)
|
||||
|
||||
open class C {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
protected suspend fun f(): I = I(suspendHere("OK"))
|
||||
}
|
||||
}
|
||||
|
||||
class D : C() {
|
||||
companion object {
|
||||
suspend fun g() = f()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "FAIL"
|
||||
builder {
|
||||
result = D.g().x as String
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user