[Wasm] Fix for ReturnableBlockLowering invalid ir type for converted inlined blocks

This commit is contained in:
Igor Yakovlev
2023-04-11 15:32:36 +02:00
committed by Space Team
parent 08273623e6
commit edf4e80165
17 changed files with 126 additions and 6 deletions
@@ -0,0 +1,25 @@
// WITH_STDLIB
import kotlin.coroutines.*
suspend fun <T> withCorutine(block: suspend () -> Unit): Unit {
block()
}
fun builder(c: suspend () -> Unit) {
c.startCoroutine(Continuation(EmptyCoroutineContext) {
it.getOrThrow()
})
}
inline fun f(): Int {
if (42 != 42) return 12345
return 67890
}
fun box(): String {
builder {
check(f() == 67890)
}
return "OK"
}