NI: introduce simple calls storage (which aren't gone through type inference) in coroutine inference session to further substitute postponed variable

^KT-40151 Fixed
This commit is contained in:
Victor Petukhov
2020-07-09 15:17:07 +03:00
parent 3acb4e54d5
commit 514ac7dc8f
10 changed files with 124 additions and 37 deletions
@@ -0,0 +1,24 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// WITH_COROUTINES
import helpers.*
import kotlin.coroutines.*
suspend fun foo() {
val x = sequence {
yield(1)
::`yield`
}
}
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
fun box(): String {
builder { foo() }
return "OK"
}