Files
kotlin-fork/idea/jvm-debugger/jvm-debugger-test/testData/continuation/suspendFun.kt
T
Ilmir Usmanov 4fb5f8603a Keep $continuation in LVT
in case of suspend functions and `this` is case of lambdas, since they
are used in async stack trace generation.
Update tests.
 #KT-40661 Open
2020-07-29 00:01:12 +02:00

29 lines
523 B
Kotlin
Vendored

package coroutine1
import kotlin.coroutines.Continuation
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.coroutines.startCoroutine
fun main() {
val cnt = Continuation<Int>(EmptyCoroutineContext) { }
val result = ::test1.startCoroutine(1, cnt)
println(result)
}
suspend fun test1(i: Int): Int {
val test1 = "a"
a(test1)
return i
}
suspend fun a(aParam: String) {
val a = "a"
b(a)
a + aParam
}
suspend fun b(bParam: String) {
val b = "b"
//Breakpoint!
b + 1
}