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
@@ -3,7 +3,9 @@ data class A(val x: String, val y: String)
|
||||
|
||||
suspend fun foo(a: A, block: suspend (Int, A, String) -> String): String = block(1, a, "#")
|
||||
|
||||
suspend fun test() = foo(A("O", "K")) { i_param, (x_param, y_param), v_param -> i_param.toString() + x_param + y_param + v_param }
|
||||
suspend fun test() = foo(A("O", "K")) { i_param, (x_param, y_param), v_param ->
|
||||
i_param.toString() + x_param + y_param + v_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).
|
||||
@@ -13,7 +15,6 @@ suspend fun test() = foo(A("O", "K")) { i_param, (x_param, y_param), v_param ->
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// VARIABLE : NAME=i_param TYPE=I INDEX=2
|
||||
// VARIABLE : NAME=$dstr$x_param$y_param TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=v_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=5
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=6
|
||||
|
||||
Reference in New Issue
Block a user