Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt32793.kt
T
2021-10-12 08:42:00 +03:00

24 lines
456 B
Kotlin
Vendored

// WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND: JVM
import kotlin.coroutines.startCoroutine
import helpers.EmptyContinuation
suspend fun test() {
suspend fun process(myValue: UInt) {
if (myValue != 42u) throw AssertionError(myValue)
}
val value: UInt = 42u
process(value)
}
fun builder(block: suspend () -> Unit) {
block.startCoroutine(EmptyContinuation)
}
fun box(): String {
builder { test() }
return "OK"
}