JVM_IR: Box generic Result parameter in suspend lambda

#KT-44527 Fixed
This commit is contained in:
Ilmir Usmanov
2021-02-02 18:36:28 +01:00
parent a30a961cf5
commit 02f845636e
9 changed files with 55 additions and 1 deletions
@@ -0,0 +1,15 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
import kotlin.coroutines.*
fun box(): String {
suspend {
listOf(Result.success(true)).forEach {
println(it.getOrNull())
}
}.startCoroutine(Continuation(EmptyCoroutineContext) {
it.getOrThrow()
})
return "OK"
}