[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
This commit is contained in:
committed by
Space Team
parent
5ecf9cce25
commit
3b9724d20e
+8
-6
@@ -65,14 +65,16 @@ fun test4(ss: List<String>?) {
|
||||
fun test5() {
|
||||
var i: Int = 0
|
||||
Outer@ while (true) { // BLOCK
|
||||
i = i.inc()
|
||||
i /*~> Unit */
|
||||
{ // BLOCK
|
||||
i = i.inc()
|
||||
i
|
||||
} /*~> Unit */
|
||||
var j: Int = 0
|
||||
{ // BLOCK
|
||||
Inner@ do// COMPOSITE {
|
||||
j = j.inc()
|
||||
j
|
||||
// } while (when {
|
||||
Inner@ do{ // BLOCK
|
||||
j = j.inc()
|
||||
j
|
||||
} while (when {
|
||||
greaterOrEqual(arg0 = j, arg1 = 3) -> false
|
||||
else -> break@Inner
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user