Files
kotlin-fork/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt
T
2020-11-26 00:14:11 +03:00

42 lines
913 B
Plaintext
Vendored

operator fun Any.plusAssign(lambda: Function0<Unit>) {
}
operator fun Any.get(index: Function0<Unit>): Int {
return 42
}
operator fun Any.set(index: Function0<Unit>, value: Int) {
}
fun test1(a: Any) {
plusAssign($receiver = a, lambda = local fun <anonymous>() {
return Unit
}
)
}
fun test2(a: Any) {
{ // BLOCK
val tmp0_array: Any = a
val tmp1_index0: Function0<Unit> = local fun <anonymous>() {
return Unit
}
set($receiver = tmp0_array, index = tmp1_index0, value = get($receiver = tmp0_array, index = tmp1_index0).plus(other = 42))
}
}
fun test3(a: Any) {
{ // BLOCK
val tmp0_array: Any = a
val tmp1_index0: Function0<Unit> = local fun <anonymous>() {
return Unit
}
val tmp2: Int = get($receiver = tmp0_array, index = tmp1_index0)
set($receiver = tmp0_array, index = tmp1_index0, value = tmp2.inc())
tmp2
} /*~> Unit */
}