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
This commit is contained in:
@@ -19,7 +19,7 @@ suspend fun test1(i: Int): Int {
|
||||
suspend fun a(aParam: String) {
|
||||
val a = "a"
|
||||
b(a)
|
||||
a + 1
|
||||
a + aParam
|
||||
}
|
||||
|
||||
suspend fun b(bParam: String) {
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@ fun main() {
|
||||
runBlocking {
|
||||
val rootCoroutineVal = mainTestVal
|
||||
TestSuspendA().a()
|
||||
print("")
|
||||
print(rootCoroutineVal)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class TestSuspendA {
|
||||
suspend fun a() {
|
||||
val methodVal = ""
|
||||
InClassB().b()
|
||||
print("")
|
||||
print(methodVal)
|
||||
}
|
||||
|
||||
class InClassB {
|
||||
@@ -27,7 +27,7 @@ class TestSuspendA {
|
||||
suspend fun b() {
|
||||
val inClassBMethodVal = ""
|
||||
InClassC().c()
|
||||
print("")
|
||||
print(inClassBMethodVal)
|
||||
}
|
||||
|
||||
inner class InClassC {
|
||||
@@ -37,7 +37,7 @@ class TestSuspendA {
|
||||
yield()
|
||||
val inClassCMethodVal = ""
|
||||
//Breakpoint!
|
||||
print("")
|
||||
print(inClassCMethodVal)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,12 +4,12 @@ Connected to the target VM
|
||||
suspendFunWithInner.kt:40
|
||||
Thread stack trace:
|
||||
CoroutinePreflightFrame c:!LINE_NUMBER!, TestSuspendA$InClassB$InClassC (continuation)
|
||||
($completion, $continuation, $result, inClassCMethodVal, this)
|
||||
($completion, $continuation, $result, inClassCMethodVal)
|
||||
CoroutineInfo: 1 coroutine RUNNING
|
||||
CoroutineStackFrame b:!LINE_NUMBER!, TestSuspendA$InClassB (continuation)
|
||||
(inClassBMethodVal, this)
|
||||
(inClassBMethodVal)
|
||||
CoroutineStackFrame a:!LINE_NUMBER!, TestSuspendA (continuation)
|
||||
(methodVal, this)
|
||||
(methodVal)
|
||||
CoroutineStackFrame invokeSuspend:!LINE_NUMBER!, SuspendFunWithInnerKt$main$1 (continuation)
|
||||
(rootCoroutineVal)
|
||||
CoroutineStackFrame resumeWith:!LINE_NUMBER!, BaseContinuationImpl (kotlin.coroutines.jvm.internal)
|
||||
|
||||
Reference in New Issue
Block a user