[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:
Kirill Rakhman
2023-02-21 16:24:34 +01:00
committed by Space Team
parent 5ecf9cce25
commit 3b9724d20e
77 changed files with 1171 additions and 553 deletions
@@ -21801,6 +21801,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt");
@@ -37903,11 +37908,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt");