Files
kotlin-fork/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt
T
Kirill Rakhman 3b9724d20e [FIR] Desugar increment/decrement in body resolve phase
The expression needs to be resolved first to determine if there is a
receiver that needs to be extracted to a temporary variable. Also, the
special case for prefix increment/decrement on local variable without
delegates requires resolution to check if the variable is local.

^KT-56771 Fixed
^KT-56659 Fixed
2023-03-02 10:19:57 +00:00

12 lines
258 B
Kotlin
Vendored

fun test(j: J) {
j.getFoo() /*~> Unit */
j.setFoo(x = 1)
{ // BLOCK
val <receiver>: J = j
val <unary>: Int = <receiver>.getFoo()
<receiver>.setFoo(x = <unary>.inc())
<unary>
} /*~> Unit */
j.setFoo(x = j.getFoo().plus(other = 1))
}