[FIR] Capture array and indices for postfix/prefix increment/decrement
of array element (including overloaded indexed access operators, e.g., `a[b, c]++`). This prevents double-evaluation of the array and indices expressions, which may have side-effects.
This commit is contained in:
committed by
teamcityserver
parent
eb631bc429
commit
a2a4d94834
Generated
+5
@@ -11136,6 +11136,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("argumentWithSideEffects.kt")
|
||||
public void testArgumentWithSideEffects() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/argumentWithSideEffects.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("arrayElement.kt")
|
||||
public void testArrayElement() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/arrayElement.kt");
|
||||
|
||||
Generated
+5
@@ -11136,6 +11136,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("argumentWithSideEffects.kt")
|
||||
public void testArgumentWithSideEffects() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/argumentWithSideEffects.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("arrayElement.kt")
|
||||
public void testArrayElement() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/arrayElement.kt");
|
||||
|
||||
+5
@@ -11201,6 +11201,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("argumentWithSideEffects.kt")
|
||||
public void testArgumentWithSideEffects() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/argumentWithSideEffects.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("arrayElement.kt")
|
||||
public void testArrayElement() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/arrayElement.kt");
|
||||
|
||||
Reference in New Issue
Block a user