Files
kotlin-fork/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt
T
Vladimir Sukharev bae8b283c7 [IR] Normalize temp var names in Kotlin-like dump
^KT-61983 Fixed
2023-10-11 07:49:35 +00:00

32 lines
763 B
Kotlin
Vendored

fun test1() {
val x: Int
val x$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
local get(): Int {
return x$delegate.getValue<Int>(thisRef = null, property = ::x)
}
println(message = <get-x>())
}
fun test2() {
var x: Int
val x$delegate: HashMap<String, Int> = hashMapOf<String, Int>()
local get(): Int {
return x$delegate.getValue<Int, Int>(thisRef = null, property = ::x)
}
local set(value: Int) {
return x$delegate.setValue<Int>(thisRef = null, property = ::x, value = value)
}
<set-x>(value = 0)
{ // BLOCK
val tmp_0: Int = <get-x>()
<set-x>(value = tmp_0.inc())
tmp_0
} /*~> Unit */
<set-x>(value = <get-x>().plus(other = 1))
}