Put suspend lambda's parameters to LVT

#KT-26412 Fixed
 #KT-28534 Fixed
This commit is contained in:
Ilmir Usmanov
2019-03-28 19:57:56 +03:00
parent 21fe5ac415
commit 6f14dcfacb
13 changed files with 139 additions and 94 deletions
@@ -0,0 +1,18 @@
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class A {
operator fun component1() = "O"
operator fun component2(): String = throw RuntimeException("fail 0")
operator fun component3() = "K"
}
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 }
// METHOD : UnderscoreNamesKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
// 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
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1