diff --git a/analysis/low-level-api-fir/testdata/getOrBuildFir/expressions/insidePlusAssignTarget.out_of_src_roots.txt b/analysis/low-level-api-fir/testdata/getOrBuildFir/expressions/insidePlusAssignTarget.out_of_src_roots.txt index e194f476723..89eb83c80dc 100644 --- a/analysis/low-level-api-fir/testdata/getOrBuildFir/expressions/insidePlusAssignTarget.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testdata/getOrBuildFir/expressions/insidePlusAssignTarget.out_of_src_roots.txt @@ -9,11 +9,15 @@ FIR FILE: FILE: [ResolvedTo(IMPORTS)] insidePlusAssignTarget.kt [ResolvedTo(BODY_RESOLVE)] annotations container public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/collections/MutableMap>|): R|kotlin/Unit| { - R|/x|.#(Int(1), = [ResolvedTo(BODY_RESOLVE)] getOrPut@fun (): { - ^ #() + { + [ResolvedTo(BODY_RESOLVE)] lval : R|kotlin/collections/MutableMap>| = R|/x| + R|/|.#(Int(1), = [ResolvedTo(BODY_RESOLVE)] getOrPut@fun (): { + ^ #() + } + ) = R|/|.#(Int(1), = [ResolvedTo(BODY_RESOLVE)] getOrPut@fun (): { + ^ #() + } + ).R|kotlin/plus|(String(str)) } - ) = R|/x|.#(Int(1), = [ResolvedTo(BODY_RESOLVE)] getOrPut@fun (): { - ^ #() - } - ).R|kotlin/plus|(String(str)) + } \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.fir.txt b/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.fir.txt index 615f08527c7..d940186f703 100644 --- a/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.fir.txt @@ -1,4 +1,8 @@ FILE: main.kt public final fun test(b: R|B|): R|kotlin/Unit| { - R|/b|.R|/B.text| = R|/b|.R|/B.text|.R|kotlin/String.plus|(String()) + { + lval : R|B| = R|/b| + R|/|.R|/B.text| = R|/|.R|/B.text|.R|kotlin/String.plus|(String()) + } + } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/kt39076.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/kt39076.fir.txt index 8aa7242aa55..58dbc0f695e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/kt39076.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/kt39076.fir.txt @@ -1,4 +1,8 @@ FILE: main.kt public final fun main(j: R|JavaClass|): R|kotlin/Unit| { - R|/j|.R|/JavaClass.foo| = R|/j|.R|/JavaClass.foo|.R|kotlin/String.plus|(String(OK)) + { + lval : R|JavaClass| = R|/j| + R|/|.R|/JavaClass.foo| = R|/|.R|/JavaClass.foo|.R|kotlin/String.plus|(String(OK)) + } + } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 7cf50bd4057..7188a4d43bc 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -35001,12 +35001,24 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } + @Test + @TestMetadata("augmentedAssigmentPlusLhsCount.kt") + public void testAugmentedAssigmentPlusLhsCount() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt"); + } + @Test @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { @@ -35127,6 +35139,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 1aaeef2c68f..4798ae416a2 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -35001,12 +35001,24 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } + @Test + @TestMetadata("augmentedAssigmentPlusLhsCount.kt") + public void testAugmentedAssigmentPlusLhsCount() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt"); + } + @Test @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { @@ -35127,6 +35139,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index e3b37486889..600cbeffb55 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -2594,6 +2594,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index 56c33961506..995c7e496ca 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -2594,6 +2594,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index 71d6b851bb0..5408c8bbcac 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -647,10 +647,11 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT ) dataFlowAnalyzer.exitFunctionCall(resolvedOperatorCall, callCompleted = true) + val leftArgumentDesugaredSource = leftArgument.source?.fakeElement(KtFakeSourceElementKind.DesugaredCompoundAssignment) val unwrappedLeftArgument = leftArgument.unwrapSmartcastExpression() val assignmentLeftArgument = buildDesugaredAssignmentValueReferenceExpression { expressionRef = FirExpressionRef().apply { bind(unwrappedLeftArgument) } - source = leftArgument.source?.fakeElement(KtFakeSourceElementKind.DesugaredCompoundAssignment) + source = leftArgumentDesugaredSource } val assignment = @@ -660,16 +661,36 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT rValue = resolvedOperatorCall annotations += assignmentOperatorStatement.annotations } - return assignment.transform(transformer, ResolutionMode.ContextIndependent) + + val receiverTemporaryVariable = + generateExplicitReceiverTemporaryVariable(session, unwrappedLeftArgument, leftArgumentDesugaredSource) + return if (receiverTemporaryVariable != null) { + buildBlock { + source = assignmentOperatorStatement.source?.fakeElement(KtFakeSourceElementKind.DesugaredCompoundAssignment) + annotations += assignmentOperatorStatement.annotations + + statements += receiverTemporaryVariable + statements += assignment + } + } else { + assignment + }.transform(transformer, ResolutionMode.ContextIndependent) + } + + fun chooseResolved(): FirStatement { + // If neither candidate is successful, choose whichever is resolved, prioritizing assign + val isAssignResolved = (assignCallReference as? FirErrorReferenceWithCandidate)?.diagnostic !is ConeUnresolvedNameError + val isOperatorResolved = (operatorCallReference as? FirErrorReferenceWithCandidate)?.diagnostic !is ConeUnresolvedNameError + return when { + isAssignResolved -> chooseAssign() + isOperatorResolved -> chooseOperator() + else -> chooseAssign() + } } fun reportAmbiguity(): FirStatement { - val operatorCallCandidate = operatorCallReference?.candidate - val assignmentCallCandidate = assignCallReference?.candidate - - requireNotNull(operatorCallCandidate) - requireNotNull(assignmentCallCandidate) - + val operatorCallCandidate = requireNotNull(operatorCallReference?.candidate) + val assignmentCallCandidate = requireNotNull(assignCallReference?.candidate) return buildErrorExpression { source = assignmentOperatorStatement.source diagnostic = ConeOperatorAmbiguityError(listOf(operatorCallCandidate, assignmentCallCandidate)) @@ -678,16 +699,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT return when { assignIsSuccessful && !lhsIsVar -> chooseAssign() - !assignIsSuccessful && !operatorIsSuccessful -> { - // If neither candidate is successful, choose whichever is resolved, prioritizing assign - val isAssignResolved = (assignCallReference as? FirErrorReferenceWithCandidate)?.diagnostic !is ConeUnresolvedNameError - val isOperatorResolved = (operatorCallReference as? FirErrorReferenceWithCandidate)?.diagnostic !is ConeUnresolvedNameError - when { - isAssignResolved -> chooseAssign() - isOperatorResolved -> chooseOperator() - else -> chooseAssign() - } - } + !assignIsSuccessful && !operatorIsSuccessful -> chooseResolved() !assignIsSuccessful && operatorIsSuccessful -> chooseOperator() assignIsSuccessful && !operatorIsSuccessful -> chooseAssign() leftArgument.typeRef.coneType is ConeDynamicType -> chooseAssign() @@ -750,25 +762,8 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT source = desugaredSource annotations += incrementDecrementExpression.annotations - (expression as? FirQualifiedAccessExpression)?.explicitReceiver - // If a receiver x exists, write it to a temporary variable to prevent multiple calls to it. - // Exceptions: ResolvedQualifiers and ThisReceivers as they can't have side effects when called. - ?.takeIf { it is FirQualifiedAccessExpression && it !is FirThisReceiverExpression } - ?.let { receiver -> - // val = x - statements += generateTemporaryVariable(SpecialNames.RECEIVER, receiver).also { property -> - // Change the expression from x.a to .a - val newReceiverAccess = - property.toQualifiedAccess(fakeSource = receiver.source?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement)) - - if (expression.explicitReceiver == expression.dispatchReceiver) { - expression.replaceDispatchReceiver(newReceiverAccess) - } else { - expression.replaceExtensionReceiver(newReceiverAccess) - } - expression.replaceExplicitReceiver(newReceiverAccess) - } - } + generateExplicitReceiverTemporaryVariable(session, expression, desugaredSource) + ?.let { statements += it } if (incrementDecrementExpression.isPrefix) { // a = a.inc() diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt index c9b31c9a753..b9ed53c8afc 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt @@ -16,16 +16,15 @@ import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirVariable import org.jetbrains.kotlin.fir.declarations.builder.buildProperty import org.jetbrains.kotlin.fir.declarations.impl.FirResolvedDeclarationStatusImpl -import org.jetbrains.kotlin.fir.expressions.FirAnnotation -import org.jetbrains.kotlin.fir.expressions.FirExpression -import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression +import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.builder.buildPropertyAccessExpression +import org.jetbrains.kotlin.fir.references.FirSuperReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol import org.jetbrains.kotlin.fir.types.FirTypeRef -import org.jetbrains.kotlin.fir.types.builder.buildImplicitTypeRef import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImplWithoutSource import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.SpecialNames fun FirVariable.toQualifiedAccess( fakeSource: KtSourceElement? = source?.fakeElement(KtFakeSourceElementKind.ReferenceInAtomicQualifiedAccess), @@ -66,3 +65,38 @@ fun generateTemporaryVariable( } } +fun generateExplicitReceiverTemporaryVariable( + session: FirSession, + expression: FirExpression, + source: KtSourceElement?, +): FirProperty? { + return (expression as? FirQualifiedAccessExpression)?.explicitReceiver + ?.takeIf { + // If a receiver x exists, write it to a temporary variable to prevent multiple calls to it. + // Exceptions: ResolvedQualifiers, ThisReceivers, and SuperReference as they can't have side effects when called. + it !is FirResolvedQualifier + && it !is FirThisReceiverExpression + && !(it is FirQualifiedAccessExpression && it.calleeReference is FirSuperReference) + } + ?.let { receiver -> + // val = x + generateTemporaryVariable( + moduleData = session.moduleData, + source = source, + name = SpecialNames.RECEIVER, + initializer = receiver, + typeRef = receiver.typeRef.copyWithNewSource(source), + ).also { property -> + // Change the expression from x.a to .a + val newReceiverAccess = + property.toQualifiedAccess(fakeSource = receiver.source?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement)) + + if (expression.explicitReceiver == expression.dispatchReceiver) { + expression.replaceDispatchReceiver(newReceiverAccess) + } else { + expression.replaceExtensionReceiver(newReceiverAccess) + } + expression.replaceExplicitReceiver(newReceiverAccess) + } + } +} diff --git a/js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt b/compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt similarity index 91% rename from js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt rename to compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt index 6c65b5b589a..7eaa331e9f8 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt +++ b/compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_K2: JS_IR -// FIR_STATUS: KT-53490 // EXPECTED_REACHABLE_NODES: 1286 package foo @@ -59,4 +57,8 @@ fun box(): String { assertEquals(3, a.prop) return "OK" -} \ No newline at end of file +} + +fun assertEquals(first: Any?, second: Any?) { + if (first != second) throw AssertionError("$first != $second") +} diff --git a/compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt b/compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt new file mode 100644 index 00000000000..b85f5191fef --- /dev/null +++ b/compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt @@ -0,0 +1,52 @@ +// TARGET_BACKEND: JVM_IR +// IGNORE_BACKEND_K1: JVM_IR + +var cnt = 0 + +fun A?.getA(): A? { + cnt++ + return this +} + +fun get0(): Int { + cnt++ + return 0 +} + +class A + +var A?.b: A? + get() { + return this + } + set(v) { + } + +operator fun A?.get(i: Int): A? = this +operator fun A?.set(i: Int, v: A?): A? { + return this +} + +operator fun A?.plus(a: A?) = this + +fun test(a: A?) { + a?.getA().b += null + a.getA().b += null + + a?.b[get0()] += null + a.b[get0()] += null + + a?.b[get0()][get0()] += null + a.b[get0()][get0()] += null +} + +fun box(): String { + test(null) + if (cnt != 4) return "fail 1: $cnt" + + cnt = 0 + test(A()) + if (cnt != 8) return "fail 2: $cnt" + + return "OK" +} diff --git a/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt b/compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt similarity index 89% rename from js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt rename to compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt index cacd87b41f8..6960ebea498 100644 --- a/js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt +++ b/compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_K2: JS_IR -// FIR_STATUS: KT-53490 // EXPECTED_REACHABLE_NODES: 1298 package foo @@ -55,4 +53,8 @@ fun box(): String { assertEquals("getArray();getArrayIndex();A.plus(3);foo;A.plus(20);bar();A.plus(200);", log) return "OK" -} \ No newline at end of file +} + +fun assertEquals(first: Any?, second: Any?) { + if (first != second) throw AssertionError("$first != $second") +} diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt index 961184bbaa0..7cdbc364c0b 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt @@ -21,9 +21,12 @@ FILE fqName: fileName:/javaSyntheticGenericPropertyAccess.kt x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null - CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ - $this: GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null - x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null - other: CONST Int type=kotlin.Int value=1 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.J.test> [val] + GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null + CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_2: .J.test> declared in .test' type=.J.test> origin=null + x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_2: .J.test> declared in .test' type=.J.test> origin=null + other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt index 3a68ff1aa71..687463ac4a4 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt @@ -7,5 +7,8 @@ fun test(j: J) { .setFoo(x = .inc()) } /*~> Unit */ - j.setFoo(x = j.getFoo().plus(other = 1)) + { // BLOCK + val : J = j + .setFoo(x = .getFoo().plus(other = 1)) + } } diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt index b39012018ab..a657aca8b12 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt @@ -20,9 +20,12 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null - CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ - $this: GET_VAR 'j: .J declared in .test' type=.J origin=null - x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'j: .J declared in .test' type=.J origin=null - other: CONST Int type=kotlin.Int value=1 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.J [val] + GET_VAR 'j: .J declared in .test' type=.J origin=null + CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_2: .J declared in .test' type=.J origin=null + x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_2: .J declared in .test' type=.J origin=null + other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt index 453b5c1a535..e6285acbc8a 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt @@ -7,5 +7,8 @@ fun test(j: J) { .setFoo(x = .inc()) } /*~> Unit */ - j.setFoo(x = j.getFoo().plus(other = 1)) + { // BLOCK + val : J = j + .setFoo(x = .getFoo().plus(other = 1)) + } } diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt index d76c7ba9b1e..e938ad240a2 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt @@ -74,42 +74,44 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: BLOCK type=kotlin.Int origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:test.C [val] + GET_VAR 'val tmp_1: test.C? declared in test.testProperty' type=test.C? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY - $receiver: GET_VAR 'val tmp_1: test.C? declared in test.testProperty' type=test.C? origin=null + $receiver: GET_VAR 'val tmp_2: test.C declared in test.testProperty' type=test.C origin=null CALL 'public final fun (value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=EQ - $receiver: GET_VAR 'val tmp_1: test.C? declared in test.testProperty' type=test.C? origin=null + $receiver: GET_VAR 'val tmp_2: test.C declared in test.testProperty' type=test.C origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_2: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null - GET_VAR 'val tmp_2: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_3: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null + GET_VAR 'val tmp_3: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null FUN name:testArrayAccess visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit VALUE_PARAMETER name:nc index:0 type:test.C? BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:test.C? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:test.C? [val] GET_VAR 'nc: test.C? declared in test.testArrayAccess' type=test.C? origin=null WHEN type=kotlin.Int? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_3: test.C? declared in test.testArrayAccess' type=test.C? origin=null + arg0: GET_VAR 'val tmp_4: test.C? declared in test.testArrayAccess' type=test.C? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: BLOCK type=kotlin.Int origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY - $receiver: GET_VAR 'val tmp_3: test.C? declared in test.testArrayAccess' type=test.C? origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] - CONST Int type=kotlin.Int value=0 + CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY + $receiver: GET_VAR 'val tmp_4: test.C? declared in test.testArrayAccess' type=test.C? origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in test' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_4: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null - index: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + $receiver: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + index: GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=null - $receiver: GET_VAR 'val tmp_4: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null - index: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + $receiver: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + index: GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null - GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_7: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null + GET_VAR 'val tmp_7: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt index cd273b21021..e1d287f4ef8 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt @@ -39,8 +39,9 @@ fun testProperty(nc: C?) { when { EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null else -> { // BLOCK - val : Int = tmp1_safe_receiver.() - tmp1_safe_receiver.(value = .inc()) + val : C = tmp1_safe_receiver + val : Int = .() + .(value = .inc()) } } diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt new file mode 100644 index 00000000000..6890558c564 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt @@ -0,0 +1,460 @@ +FILE fqName:foo fileName:/AssignmentOperator.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.A + CONSTRUCTOR visibility:public <> () returnType:foo.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:prop visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private + EXPRESSION_BODY + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.Int + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in foo.A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': foo.A declared in foo.A.' type=foo.A origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.A, :kotlin.Int) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.A + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': foo.A declared in foo.A.' type=foo.A origin=null + value: GET_VAR ': kotlin.Int declared in foo.A.' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.B + CONSTRUCTOR visibility:private <> () returnType:foo.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:prop visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private + EXPRESSION_BODY + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.Int + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in foo.B' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': foo.B declared in foo.B.' type=foo.B origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.B, :kotlin.Int) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.B + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': foo.B declared in foo.B.' type=foo.B origin=null + value: GET_VAR ': kotlin.Int declared in foo.B.' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + PROPERTY name:array visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:array type:kotlin.Array visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array origin=null + : kotlin.Int + elements: VARARG type=kotlin.Array varargElementType=kotlin.Int + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Array + correspondingProperty: PROPERTY name:array visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array declared in foo' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:array type:kotlin.Array visibility:private [final,static]' type=kotlin.Array origin=null + FUN name:id visibility:public modality:FINAL (t:T of foo.id) returnType:T of foo.id + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER name:t index:0 type:T of foo.id + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun id (t: T of foo.id): T of foo.id declared in foo' + GET_VAR 't: T of foo.id declared in foo.id' type=T of foo.id origin=null + FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:a type:foo.A [val] + CONSTRUCTOR_CALL 'public constructor () declared in foo.A' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + : CONST Int type=kotlin.Int value=10 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_0: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_0: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_1: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_1: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_2: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_2: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=2 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_3: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_3: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=5 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_4: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_4: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=3 + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_5: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_5: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_6: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_6: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_7: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_7: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_8: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_8: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_11: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_11: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_12: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_12: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + index: CONST Int type=kotlin.Int value=0 + value: CONST Int type=kotlin.Int value=10 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_13: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_14: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_13: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_14: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_15: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_16: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_15: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_16: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_17: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_18: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_17: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_18: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=2 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_19: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_20: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_19: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_20: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=5 + BLOCK type=kotlin.Unit origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_21: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_22: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_21: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_22: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=3 + VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_25: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + GET_VAR 'val tmp_25: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_26: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_27: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_26: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_27: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_28: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + GET_VAR 'val tmp_28: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_35: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + GET_VAR 'val tmp_35: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_36: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_37: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_36: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_37: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_38: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + GET_VAR 'val tmp_38: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_42 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.main' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt new file mode 100644 index 00000000000..f6736864a4a --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt @@ -0,0 +1,164 @@ +package foo + +class A { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + var prop: Int + field = 0 + get + set + +} + +object B { + private constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + var prop: Int + field = 0 + get + set + +} + +val array: Array + field = arrayOf(elements = [0]) + get + +fun id(t: T): T { + return t +} + +fun main() { + val a: A = A() + id(t = a).( = 10) + { // BLOCK + val : A = id(t = a) + .( = .().plus(other = 20)) + } + { // BLOCK + val : A = id(t = a) + .( = .().minus(other = 20)) + } + { // BLOCK + val : A = id(t = a) + .( = .().times(other = 2)) + } + { // BLOCK + val : A = id(t = a) + .( = .().div(other = 5)) + } + { // BLOCK + val : A = id(t = a) + .( = .().rem(other = 3)) + } + { // BLOCK + val : A = id(t = a) + val : Int = .() + .( = .inc()) + + } /*~> Unit */ + { // BLOCK + val : A = id(t = a) + val : Int = .() + .( = .dec()) + + } /*~> Unit */ + { // BLOCK + val : A = id(t = a) + .( = .().inc()) + .() + } /*~> Unit */ + { // BLOCK + val : A = id(t = a) + .( = .().dec()) + .() + } /*~> Unit */ + { // BLOCK + val : Int = B.() + B.( = .inc()) + + } /*~> Unit */ + { // BLOCK + val : Int = B.() + B.( = .dec()) + + } /*~> Unit */ + { // BLOCK + B.( = B.().inc()) + B.() + } /*~> Unit */ + { // BLOCK + B.( = B.().dec()) + B.() + } /*~> Unit */ + id>(t = ()).set(index = 0, value = 10) + { // BLOCK + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).plus(other = 20)) + } + { // BLOCK + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).minus(other = 20)) + } + { // BLOCK + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).times(other = 2)) + } + { // BLOCK + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).div(other = 5)) + } + { // BLOCK + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).rem(other = 3)) + } + val : Array = id>(t = ()) + val : Int = 0 + val : Int = .get(index = ) + .set(index = , value = .inc()) + /*~> Unit */ + val : Array = id>(t = ()) + val : Int = 0 + val : Int = .get(index = ) + .set(index = , value = .dec()) + /*~> Unit */ + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).inc()) + .get(index = ) /*~> Unit */ + val : Array = id>(t = ()) + val : Int = 0 + .set(index = , value = .get(index = ).dec()) + .get(index = ) /*~> Unit */ + val : Array = () + val : Int = 0 + val : Int = .get(index = ) + .set(index = , value = .inc()) + /*~> Unit */ + val : Array = () + val : Int = 0 + val : Int = .get(index = ) + .set(index = , value = .dec()) + /*~> Unit */ + val : Array = () + val : Int = 0 + .set(index = , value = .get(index = ).inc()) + .get(index = ) /*~> Unit */ + val : Array = () + val : Int = 0 + .set(index = , value = .get(index = ).dec()) + .get(index = ) /*~> Unit */ +} diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.ir.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.ir.txt new file mode 100644 index 00000000000..5ee48a23099 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.ir.txt @@ -0,0 +1,484 @@ +FILE fqName:foo fileName:/AssignmentOperator.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.A + CONSTRUCTOR visibility:public <> () returnType:foo.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:prop visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private + EXPRESSION_BODY + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.A) returnType:kotlin.Int + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in foo.A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': foo.A declared in foo.A.' type=foo.A origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.A, :kotlin.Int) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.A + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': foo.A declared in foo.A.' type=foo.A origin=null + value: GET_VAR ': kotlin.Int declared in foo.A.' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.B + CONSTRUCTOR visibility:private <> () returnType:foo.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:prop visibility:public modality:FINAL [var] + FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private + EXPRESSION_BODY + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.B) returnType:kotlin.Int + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in foo.B' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': foo.B declared in foo.B.' type=foo.B origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:foo.B, :kotlin.Int) returnType:kotlin.Unit + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [var] + $this: VALUE_PARAMETER name: type:foo.B + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': foo.B declared in foo.B.' type=foo.B origin=null + value: GET_VAR ': kotlin.Int declared in foo.B.' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + PROPERTY name:array visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:array type:kotlin.Array visibility:private [final,static] + EXPRESSION_BODY + CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array origin=null + : kotlin.Int + elements: VARARG type=kotlin.Array varargElementType=kotlin.Int + CONST Int type=kotlin.Int value=0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Array + correspondingProperty: PROPERTY name:array visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array declared in foo' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:array type:kotlin.Array visibility:private [final,static]' type=kotlin.Array origin=null + FUN name:id visibility:public modality:FINAL (t:T of foo.id) returnType:T of foo.id + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false + VALUE_PARAMETER name:t index:0 type:T of foo.id + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun id (t: T of foo.id): T of foo.id declared in foo' + GET_VAR 't: T of foo.id declared in foo.id' type=T of foo.id origin=null + FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:a type:foo.A [val] + CONSTRUCTOR_CALL 'public constructor () declared in foo.A' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + $this: CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + : CONST Int type=kotlin.Int value=10 + BLOCK type=kotlin.Unit origin=PLUSEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PLUSEQ + $this: GET_VAR 'val tmp_0: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PLUSEQ + $this: GET_VAR 'val tmp_0: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=MINUSEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=MINUSEQ + $this: GET_VAR 'val tmp_1: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=MINUSEQ + $this: GET_VAR 'val tmp_1: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=MULTEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=MULTEQ + $this: GET_VAR 'val tmp_2: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=MULTEQ + $this: GET_VAR 'val tmp_2: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=2 + BLOCK type=kotlin.Unit origin=DIVEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=DIVEQ + $this: GET_VAR 'val tmp_3: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=DIVEQ + $this: GET_VAR 'val tmp_3: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=5 + BLOCK type=kotlin.Unit origin=PERCEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PERCEQ + $this: GET_VAR 'val tmp_4: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PERCEQ + $this: GET_VAR 'val tmp_4: foo.A declared in foo.main' type=foo.A origin=null + other: CONST Int type=kotlin.Int value=3 + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_5: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_5: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_6: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_6: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_7: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_7: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_8: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_8: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PREFIX_INCR + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_9: foo.A declared in foo.main' type=foo.A origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:foo.A [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null + : foo.A + t: GET_VAR 'val a: foo.A declared in foo.main' type=foo.A origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PREFIX_DECR + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_10: foo.A declared in foo.main' type=foo.A origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:foo.B [val] + GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_11: foo.B declared in foo.main' type=foo.B origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_11: foo.B declared in foo.main' type=foo.B origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_12: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_12: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:foo.B [val] + GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlin.Int [val] + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_13: foo.B declared in foo.main' type=foo.B origin=null + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_13: foo.B declared in foo.main' type=foo.B origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_14: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_14: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:foo.B [val] + GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + BLOCK type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=PREFIX_INCR + $this: GET_VAR 'val tmp_15: foo.B declared in foo.main' type=foo.B origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_15: foo.B declared in foo.main' type=foo.B origin=null + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_15: foo.B declared in foo.main' type=foo.B origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:foo.B [val] + GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B + BLOCK type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=PREFIX_DECR + $this: GET_VAR 'val tmp_16: foo.B declared in foo.main' type=foo.B origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_16: foo.B declared in foo.main' type=foo.B origin=null + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_16: foo.B declared in foo.main' type=foo.B origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=EQ + $this: CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + index: CONST Int type=kotlin.Int value=0 + value: CONST Int type=kotlin.Int value=10 + BLOCK type=kotlin.Unit origin=PLUSEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PLUSEQ + $this: GET_VAR 'val tmp_17: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_18: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PLUSEQ + $this: GET_VAR 'val tmp_17: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_18: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=MINUSEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=MINUSEQ + $this: GET_VAR 'val tmp_19: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_20: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=MINUSEQ + $this: GET_VAR 'val tmp_19: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_20: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=20 + BLOCK type=kotlin.Unit origin=MULTEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=MULTEQ + $this: GET_VAR 'val tmp_21: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_22: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=MULTEQ + $this: GET_VAR 'val tmp_21: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_22: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=2 + BLOCK type=kotlin.Unit origin=DIVEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=DIVEQ + $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=DIVEQ + $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=5 + BLOCK type=kotlin.Unit origin=PERCEQ + VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PERCEQ + $this: GET_VAR 'val tmp_25: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_26: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PERCEQ + $this: GET_VAR 'val tmp_25: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_26: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=3 + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_27: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_28: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_27: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_28: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_29: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_29: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_30: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_31: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_30: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_31: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_32: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_32: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_INCR + $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Array [val] + CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null + : kotlin.Array + t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_DECR + $this: GET_VAR 'val tmp_35: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_36: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_35: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_36: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_35: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_36: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_37: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_38: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_37: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_38: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_39: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_39: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + VAR IR_TEMPORARY_VARIABLE name:tmp_42 type:kotlin.Int [val] + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_40: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_41: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_40: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_41: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_42: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + GET_VAR 'val tmp_42: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_43 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_44 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_INCR + $this: GET_VAR 'val tmp_43: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_44: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_43: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_44: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'val tmp_43: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_44: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + BLOCK type=kotlin.Int origin=PREFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_45 type:kotlin.Array [val] + CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_46 type:kotlin.Int [val] + CONST Int type=kotlin.Int value=0 + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_DECR + $this: GET_VAR 'val tmp_45: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_46: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_45: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_46: kotlin.Int declared in foo.main' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'val tmp_45: kotlin.Array declared in foo.main' type=kotlin.Array origin=null + index: GET_VAR 'val tmp_46: kotlin.Int declared in foo.main' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt new file mode 100644 index 00000000000..57bfab73ce6 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt @@ -0,0 +1,54 @@ +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR +package foo + +class A { + var prop: Int = 0 +} + +object B { + var prop: Int = 0 +} + +val array: Array = arrayOf(0) + +fun id(t: T): T { + return t +} + +fun main() { + val a = A() + + id(a).prop = 10 + id(a).prop += 20 + id(a).prop -= 20 + id(a).prop *= 2 + id(a).prop /= 5 + id(a).prop %= 3 + + id(a).prop++ + id(a).prop-- + ++id(a).prop + --id(a).prop + + B.prop++ + B.prop-- + ++B.prop + --B.prop + + id(array)[0] = 10 + id(array)[0] += 20 + id(array)[0] -= 20 + id(array)[0] *= 2 + id(array)[0] /= 5 + id(array)[0] %= 3 + + id(array)[0]++ + id(array)[0]-- + ++id(array)[0] + --id(array)[0] + + array[0]++ + array[0]-- + ++array[0] + --array[0] +} diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt new file mode 100644 index 00000000000..72a8f56dc6d --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt @@ -0,0 +1,200 @@ +package foo + +class A { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + var prop: Int + field = 0 + get + set + +} + +object B { + private constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + var prop: Int + field = 0 + get + set + +} + +val array: Array + field = arrayOf(elements = [0]) + get + +fun id(t: T): T { + return t +} + +fun main() { + val a: A = A() + id(t = a).( = 10) + { // BLOCK + val tmp0_this: A = id(t = a) + tmp0_this.( = tmp0_this.().plus(other = 20)) + } + { // BLOCK + val tmp1_this: A = id(t = a) + tmp1_this.( = tmp1_this.().minus(other = 20)) + } + { // BLOCK + val tmp2_this: A = id(t = a) + tmp2_this.( = tmp2_this.().times(other = 2)) + } + { // BLOCK + val tmp3_this: A = id(t = a) + tmp3_this.( = tmp3_this.().div(other = 5)) + } + { // BLOCK + val tmp4_this: A = id(t = a) + tmp4_this.( = tmp4_this.().rem(other = 3)) + } + { // BLOCK + val tmp5_this: A = id(t = a) + { // BLOCK + val tmp6: Int = tmp5_this.() + tmp5_this.( = tmp6.inc()) + tmp6 + } + } /*~> Unit */ + { // BLOCK + val tmp7_this: A = id(t = a) + { // BLOCK + val tmp8: Int = tmp7_this.() + tmp7_this.( = tmp8.dec()) + tmp8 + } + } /*~> Unit */ + { // BLOCK + val tmp9_this: A = id(t = a) + { // BLOCK + tmp9_this.( = tmp9_this.().inc()) + tmp9_this.() + } + } /*~> Unit */ + { // BLOCK + val tmp10_this: A = id(t = a) + { // BLOCK + tmp10_this.( = tmp10_this.().dec()) + tmp10_this.() + } + } /*~> Unit */ + { // BLOCK + val tmp11_this: B = B + { // BLOCK + val tmp12: Int = tmp11_this.() + tmp11_this.( = tmp12.inc()) + tmp12 + } + } /*~> Unit */ + { // BLOCK + val tmp13_this: B = B + { // BLOCK + val tmp14: Int = tmp13_this.() + tmp13_this.( = tmp14.dec()) + tmp14 + } + } /*~> Unit */ + { // BLOCK + val tmp15_this: B = B + { // BLOCK + tmp15_this.( = tmp15_this.().inc()) + tmp15_this.() + } + } /*~> Unit */ + { // BLOCK + val tmp16_this: B = B + { // BLOCK + tmp16_this.( = tmp16_this.().dec()) + tmp16_this.() + } + } /*~> Unit */ + id>(t = ()).set(index = 0, value = 10) + { // BLOCK + val tmp17_array: Array = id>(t = ()) + val tmp18_index0: Int = 0 + tmp17_array.set(index = tmp18_index0, value = tmp17_array.get(index = tmp18_index0).plus(other = 20)) + } + { // BLOCK + val tmp19_array: Array = id>(t = ()) + val tmp20_index0: Int = 0 + tmp19_array.set(index = tmp20_index0, value = tmp19_array.get(index = tmp20_index0).minus(other = 20)) + } + { // BLOCK + val tmp21_array: Array = id>(t = ()) + val tmp22_index0: Int = 0 + tmp21_array.set(index = tmp22_index0, value = tmp21_array.get(index = tmp22_index0).times(other = 2)) + } + { // BLOCK + val tmp23_array: Array = id>(t = ()) + val tmp24_index0: Int = 0 + tmp23_array.set(index = tmp24_index0, value = tmp23_array.get(index = tmp24_index0).div(other = 5)) + } + { // BLOCK + val tmp25_array: Array = id>(t = ()) + val tmp26_index0: Int = 0 + tmp25_array.set(index = tmp26_index0, value = tmp25_array.get(index = tmp26_index0).rem(other = 3)) + } + { // BLOCK + val tmp27_array: Array = id>(t = ()) + val tmp28_index0: Int = 0 + val tmp29: Int = tmp27_array.get(index = tmp28_index0) + tmp27_array.set(index = tmp28_index0, value = tmp29.inc()) + tmp29 + } /*~> Unit */ + { // BLOCK + val tmp30_array: Array = id>(t = ()) + val tmp31_index0: Int = 0 + val tmp32: Int = tmp30_array.get(index = tmp31_index0) + tmp30_array.set(index = tmp31_index0, value = tmp32.dec()) + tmp32 + } /*~> Unit */ + { // BLOCK + val tmp33_array: Array = id>(t = ()) + val tmp34_index0: Int = 0 + tmp33_array.set(index = tmp34_index0, value = tmp33_array.get(index = tmp34_index0).inc()) + tmp33_array.get(index = tmp34_index0) + } /*~> Unit */ + { // BLOCK + val tmp35_array: Array = id>(t = ()) + val tmp36_index0: Int = 0 + tmp35_array.set(index = tmp36_index0, value = tmp35_array.get(index = tmp36_index0).dec()) + tmp35_array.get(index = tmp36_index0) + } /*~> Unit */ + { // BLOCK + val tmp37_array: Array = () + val tmp38_index0: Int = 0 + val tmp39: Int = tmp37_array.get(index = tmp38_index0) + tmp37_array.set(index = tmp38_index0, value = tmp39.inc()) + tmp39 + } /*~> Unit */ + { // BLOCK + val tmp40_array: Array = () + val tmp41_index0: Int = 0 + val tmp42: Int = tmp40_array.get(index = tmp41_index0) + tmp40_array.set(index = tmp41_index0, value = tmp42.dec()) + tmp42 + } /*~> Unit */ + { // BLOCK + val tmp43_array: Array = () + val tmp44_index0: Int = 0 + tmp43_array.set(index = tmp44_index0, value = tmp43_array.get(index = tmp44_index0).inc()) + tmp43_array.get(index = tmp44_index0) + } /*~> Unit */ + { // BLOCK + val tmp45_array: Array = () + val tmp46_index0: Int = 0 + tmp45_array.set(index = tmp46_index0, value = tmp45_array.get(index = tmp46_index0).dec()) + tmp45_array.get(index = tmp46_index0) + } /*~> Unit */ +} diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt new file mode 100644 index 00000000000..9662fe9e009 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt @@ -0,0 +1,84 @@ +package foo + +// CHECK: +// Mangled name: foo{}array +// Public signature: foo/array|6187513897999240281[0] +val array: Array + // CHECK JVM_IR: + // Mangled name: foo#(){}kotlin.Array + // Public signature: foo/array.|7467926770652597701[0] + // CHECK JS_IR NATIVE: + // Mangled name: foo#(){} + // Public signature: foo/array.|-7741494344808015919[0] + get + +// CHECK: +// Mangled name: foo.A +// Public signature: foo/A|null[0] +class A { + // CHECK: + // Mangled name: foo.A{}prop + // Public signature: foo/A.prop|3598315380056892812[0] + var prop: Int + // CHECK JVM_IR: + // Mangled name: foo.A#(){}kotlin.Int + // Public signature: foo/A.prop.|-2094203252476742575[0] + // CHECK JS_IR NATIVE: + // Mangled name: foo.A#(){} + // Public signature: foo/A.prop.|-5734736374948136327[0] + get + // CHECK: + // Mangled name: foo.A#(kotlin.Int){} + // Public signature: foo/A.prop.|3724820243841906450[0] + set + + // CHECK: + // Mangled name: foo.A#(){} + // Public signature: foo/A.|-5645683436151566731[0] + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: foo.B +// Public signature: foo/B|null[0] +object B { + // CHECK: + // Mangled name: foo.B{}prop + // Public signature: foo/B.prop|3598315380056892812[0] + var prop: Int + // CHECK JVM_IR: + // Mangled name: foo.B#(){}kotlin.Int + // Public signature: foo/B.prop.|-2094203252476742575[0] + // CHECK JS_IR NATIVE: + // Mangled name: foo.B#(){} + // Public signature: foo/B.prop.|-5734736374948136327[0] + get + // CHECK: + // Mangled name: foo.B#(kotlin.Int){} + // Public signature: foo/B.prop.|3724820243841906450[0] + set + + // CHECK: + // Mangled name: foo.B#(){} + // Public signature: foo/B.|-5645683436151566731[0] + private constructor() /* primary */ + +} + +// CHECK JVM_IR: +// Mangled name: foo#id(0:0){0§}0:0 +// Public signature: foo/id|-6791396263062521506[0] +// CHECK JS_IR NATIVE: +// Mangled name: foo#id(0:0){0§} +// Public signature: foo/id|9187295668833355463[0] +fun id(t: T): T + +// CHECK JVM_IR: +// Mangled name computed from Ir: foo#main(){} +// Mangled name computed from Descriptor: foo#main(){}%AssignmentOperator.kt +// Public signature: foo/main|7392120756922895329[0] +// CHECK JS_IR NATIVE: +// Mangled name: foo#main(){} +// Public signature: foo/main|-4284757841571462650[0] +fun main(): Unit diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index c8ad4788e7b..dda819bb82c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -33309,6 +33309,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -33435,6 +33441,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 00a3cf6ca2f..c5b0df402e9 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -35001,12 +35001,24 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } + @Test + @TestMetadata("augmentedAssigmentPlusLhsCount.kt") + public void testAugmentedAssigmentPlusLhsCount() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt"); + } + @Test @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { @@ -35127,6 +35139,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 1e8e0beb3a6..b34747b2a51 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -35001,12 +35001,24 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } + @Test + @TestMetadata("augmentedAssigmentPlusLhsCount.kt") + public void testAugmentedAssigmentPlusLhsCount() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt"); + } + @Test @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { @@ -35127,6 +35139,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index e7db9d44c8b..1a45550daa4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -2594,6 +2594,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index fc839fdc64f..299f260f981 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -29833,6 +29833,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorConventions extends AbstractLightAnalysisModeTest { + @TestMetadata("augmentedAssigmentPlusLhsCount.kt") + public void ignoreAugmentedAssigmentPlusLhsCount() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssigmentPlusLhsCount.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } @@ -29846,6 +29851,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); @@ -29951,6 +29961,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { runTest("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index 66f9276dd9a..eb0cac340ad 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -1965,6 +1965,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { runTest("compiler/testData/ir/irText/firProblems/candidateSymbol.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsBoxTestGenerated.java index e0260b6685d..dc225a7b227 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsBoxTestGenerated.java @@ -3303,12 +3303,6 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest { runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); } - @Test - @TestMetadata("assignToDotQualifiedWithSideEffect.kt") - public void testAssignToDotQualifiedWithSideEffect() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); - } - @Test @TestMetadata("booleanAndOr.kt") public void testBooleanAndOr() throws Exception { @@ -3465,12 +3459,6 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest { runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); } - @Test - @TestMetadata("reassignmentLhsCaching.kt") - public void testReassignmentLhsCaching() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); - } - @Test @TestMetadata("secondaryConstructorTemporaryVars.kt") public void testSecondaryConstructorTemporaryVars() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 71d374ab9ca..442c126ebb4 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -24645,6 +24645,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -24771,6 +24777,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java index 4882077d7ba..1999517bc11 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java @@ -2252,6 +2252,12 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java index f1b6f927403..7318d5c620e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java @@ -2252,6 +2252,12 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java index abbe6351c8d..b7877c13227 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java @@ -2252,6 +2252,12 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); } + @Test + @TestMetadata("AssignmentOperator.kt") + public void testAssignmentOperator() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AssignmentOperator.kt"); + } + @Test @TestMetadata("candidateSymbol.kt") public void testCandidateSymbol() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.java index 0b47fa2a432..cbd30f61780 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.java @@ -3409,12 +3409,6 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test { runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); } - @Test - @TestMetadata("assignToDotQualifiedWithSideEffect.kt") - public void testAssignToDotQualifiedWithSideEffect() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); - } - @Test @TestMetadata("booleanAndOr.kt") public void testBooleanAndOr() throws Exception { @@ -3571,12 +3565,6 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test { runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); } - @Test - @TestMetadata("reassignmentLhsCaching.kt") - public void testReassignmentLhsCaching() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); - } - @Test @TestMetadata("secondaryConstructorTemporaryVars.kt") public void testSecondaryConstructorTemporaryVars() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java index 2a5aea4f9d6..b52dd6d633b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java @@ -3303,12 +3303,6 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); } - @Test - @TestMetadata("assignToDotQualifiedWithSideEffect.kt") - public void testAssignToDotQualifiedWithSideEffect() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); - } - @Test @TestMetadata("booleanAndOr.kt") public void testBooleanAndOr() throws Exception { @@ -3465,12 +3459,6 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); } - @Test - @TestMetadata("reassignmentLhsCaching.kt") - public void testReassignmentLhsCaching() throws Exception { - runTest("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); - } - @Test @TestMetadata("secondaryConstructorTemporaryVars.kt") public void testSecondaryConstructorTemporaryVars() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index a931cdc8c47..3afba50fd95 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -24645,6 +24645,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -24771,6 +24777,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index c2036e3a8fd..87b0ca29560 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -24645,6 +24645,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -24771,6 +24777,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 03892ea0bc6..bb3f00298c0 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -27644,6 +27644,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -27770,6 +27776,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 8a9816743e0..06306ef068f 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -28276,6 +28276,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -28402,6 +28408,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 4922fd68d5d..a65f7822ffc 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -27329,6 +27329,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -27455,6 +27461,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index f134b18cdcb..e85ce2856d6 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -27645,6 +27645,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -27771,6 +27777,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 1ce0f7355dd..0e2de9ca819 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -24411,6 +24411,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -24537,6 +24543,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 755ee9ab476..eb8131cb49a 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -24411,6 +24411,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } + @Test + @TestMetadata("assignToDotQualifiedWithSideEffect.kt") + public void testAssignToDotQualifiedWithSideEffect() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/assignToDotQualifiedWithSideEffect.kt"); + } + @Test @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { @@ -24537,6 +24543,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } + @Test + @TestMetadata("reassignmentLhsCaching.kt") + public void testReassignmentLhsCaching() throws Exception { + runTest("compiler/testData/codegen/box/operatorConventions/reassignmentLhsCaching.kt"); + } + @Test @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception {