9c2d06cf70
This commit removes some false ambiguities & fixes compilation of tree-generator module with FIR
40 lines
795 B
Plaintext
Vendored
40 lines
795 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) {
|
|
a.plusAssign(lambda = local fun <anonymous>() {
|
|
return Unit
|
|
}
|
|
)
|
|
}
|
|
|
|
fun test2(a: Any) {
|
|
{ // BLOCK
|
|
val <<array>>: Any = a
|
|
val <<index_0>>: Function0<Unit> = local fun <anonymous>() {
|
|
return Unit
|
|
}
|
|
|
|
<<array>>.set(index = <<index_0>>, value = <<array>>.get(index = <<index_0>>).plus(other = 42))
|
|
}
|
|
}
|
|
|
|
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 */
|
|
}
|
|
|