5bd3bcd237
* Implement IR-based main function detector
24 lines
354 B
Kotlin
Vendored
24 lines
354 B
Kotlin
Vendored
// EXPECTED_REACHABLE_NODES: 1296
|
|
// CALL_MAIN
|
|
|
|
import kotlin.coroutines.*
|
|
|
|
var ok: String = "fail"
|
|
|
|
var callback: () -> Unit = {}
|
|
|
|
suspend fun main() {
|
|
suspendCoroutine<Unit> { cont ->
|
|
callback = {
|
|
cont.resume(Unit)
|
|
}
|
|
}
|
|
|
|
ok = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
assertEquals("fail", ok)
|
|
callback()
|
|
return ok
|
|
} |