[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
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
// Behavior changed in K2, see KT-42077
|
||||
|
||||
public var inc: Int = 0
|
||||
|
||||
public var propInc: Int = 0
|
||||
@@ -26,4 +29,4 @@ fun box(): String {
|
||||
if (propDec != -1) return "fail in prefix decrement: ${propDec} != -1"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user