[IR] dumpKotlinLike: add testdata for FIR tests
This commit is contained in:
committed by
teamcityserver
parent
d7bd4240e1
commit
c68040753d
@@ -0,0 +1,31 @@
|
||||
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) {
|
||||
a.plusAssign(lambda = local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun test2(a: Any) {
|
||||
error("") /* ERROR CALL */
|
||||
}
|
||||
|
||||
fun test3(a: Any) {
|
||||
val <array>: Any = a
|
||||
val <index0>: Function0<Unit> = local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
|
||||
val <unary>: Int = <array>.get(index = <index0>)
|
||||
<array>.set(index = <index0>, value = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
}
|
||||
Reference in New Issue
Block a user