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:
+3
-2
@@ -7,7 +7,9 @@ class A {
|
||||
|
||||
suspend fun foo(a: A, block: suspend (A) -> String): String = block(a)
|
||||
|
||||
suspend fun test() = foo(A()) { (x_param, _, y_param) -> x_param + y_param }
|
||||
suspend fun test() = foo(A()) { (x_param, _, y_param) ->
|
||||
x_param + y_param
|
||||
}
|
||||
|
||||
// Parameters (including anonymous destructuring parameters) are moved to fields in the Continuation class for the suspend lambda class.
|
||||
// However, in non-IR, the fields are first stored in local variables, and they are not read directly (even for destructuring components).
|
||||
@@ -16,7 +18,6 @@ suspend fun test() = foo(A()) { (x_param, _, y_param) -> x_param + y_param }
|
||||
// METHOD : UnderscoreNamesKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// VARIABLE : NAME=$dstr$x_param$_u24__u24$y_param TYPE=LA; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=this TYPE=LUnderscoreNamesKt$test$2; INDEX=0
|
||||
|
||||
Reference in New Issue
Block a user