RawFirBuilder: fix label bounding for property initialization

#KT-58076 Fixed
This commit is contained in:
Kirill Rakhman
2023-04-19 18:26:01 +02:00
committed by Space Team
parent df8132b844
commit 594b044c26
4 changed files with 27 additions and 5 deletions
@@ -1,5 +1,6 @@
// FIR_IDENTICAL
// ISSUE: KT-57880
// ISSUE: KT-57880, KT-58076
// DIAGNOSTICS: -UNUSED_VARIABLE, -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE
fun outerLambda(action: String.() -> Unit) {}
var lambda: Int.() -> Unit = {}
@@ -18,4 +19,16 @@ fun main() {
consumeInt(this@innerLambda)
}
}
lateinit var c: Int.() -> Unit
val a = "hello".apply {
val b: Int.() -> Unit = {
this@apply.hello()
}
c = {
this@apply.hello()
}
}
}
fun String.hello() = this