Fix LVT entries of 'this' and parameters in coroutine code

#KT-24510 Fixed
This commit is contained in:
Ilmir Usmanov
2018-09-13 20:42:26 +03:00
parent 2dd5b8fa70
commit 35056543a2
4 changed files with 77 additions and 22 deletions
@@ -13,5 +13,5 @@ fun main(args: Array<String>) {
suspend fun SequenceScope<Int>.awaitSeq(): Int = 42
// 1 LOCALVARIABLE a I L18 L22 3
// 1 LINENUMBER 9 L18
// 1 LOCALVARIABLE a I L19 L23 3
// 1 LINENUMBER 9 L19
@@ -0,0 +1,24 @@
// LANGUAGE_VERSION: 1.3
suspend fun dummy() {}
val c: suspend () -> Unit = {
dummy()
dummy()
}
class A {
suspend fun foo(a: A, s: String = "", block: suspend A.() -> Unit) {
block()
block()
}
}
// 1 LOCALVARIABLE this LThisAndResultInLvtKt\$c\$1; L0 L18 0
// 1 LOCALVARIABLE result Ljava/lang/Object; L0 L18 1
// 1 LOCALVARIABLE this LA; L0 L21 0
// 1 LOCALVARIABLE a LA; L0 L21 1
// 1 LOCALVARIABLE s Ljava/lang/String; L0 L21 2
// 1 LOCALVARIABLE block Lkotlin/jvm/functions/Function2; L0 L21 3
// 1 LOCALVARIABLE \$continuation Lkotlin/coroutines/Continuation; L2 L7 6