From f9df4e14878af9cc19d4045ec35cf2404bf43152 Mon Sep 17 00:00:00 2001 From: Vladimir Sukharev Date: Tue, 18 Jul 2023 00:06:48 +0000 Subject: [PATCH] [K/N] Reorder `hashCode, toString, equals` in data classes to match K1 order ^KT-60247 Fixed Merge-request: KT-MR-11080 Merged-by: Vladimir Sukharev --- .../kotlin/fir/backend/IrBuiltInsOverFir.kt | 4 +- .../generators/DataClassMembersGenerator.kt | 40 +- .../FirLightTreeJvmIrTextTestGenerated.java | 12 +- .../ir/FirPsiJvmIrTextTestGenerated.java | 12 +- .../records/recordWithCompanion.fir.ir.txt | 42 +- .../dataClassWithArrayMembers.fir.ir.txt | 652 ------------------ .../dataClassWithArrayMembers.fir.kt.txt | 228 ------ .../dataClasses/dataClassWithArrayMembers.kt | 1 + .../dataClasses/dataClasses.fir.ir.txt | 524 -------------- .../dataClasses/dataClasses.fir.kt.txt | 199 ------ .../irText/classes/dataClasses/dataClasses.kt | 1 + .../dataClasses/dataClassesGeneric.fir.ir.txt | 372 ---------- .../dataClasses/dataClassesGeneric.fir.kt.txt | 174 ----- .../classes/dataClasses/dataClassesGeneric.kt | 1 + .../dataClasses}/dataObject.ir.txt | 0 .../dataClasses}/dataObject.kt | 1 + .../dataClasses}/dataObject.kt.txt | 0 .../dataClasses}/dataObject.sig.kt.txt | 0 .../dataClasses/delegationInSealed.fir.ir.txt | 42 +- .../dataClasses/delegationInSealed.fir.kt.txt | 17 +- .../classes/dataClasses/kt31649.fir.ir.txt | 174 ----- .../classes/dataClasses/kt31649.fir.kt.txt | 81 --- .../ir/irText/classes/dataClasses/kt31649.kt | 1 + .../classes/dataClasses/kt49936.fir.ir.txt | 98 --- .../ir/irText/classes/dataClasses/kt49936.kt | 1 + ...mbdaInDataClassDefaultParameter.fir.ir.txt | 84 +-- ...mbdaInDataClassDefaultParameter.fir.kt.txt | 33 +- .../dataClasses/openDataClass.fir.ir.txt | 139 ---- .../dataClasses/openDataClass.fir.kt.txt | 56 -- .../classes/dataClasses/openDataClass.kt | 1 + .../ir/irText/classes/inlineClass.fir.ir.txt | 67 -- .../ir/irText/classes/inlineClass.fir.kt.txt | 32 - .../testData/ir/irText/classes/inlineClass.kt | 1 + .../inlineClassSyntheticMethods.fir.ir.txt | 131 ---- .../inlineClassSyntheticMethods.fir.kt.txt | 61 -- .../classes/inlineClassSyntheticMethods.kt | 1 + .../arrayAccessCompositeOperators.fir.ir.txt | 42 +- .../arrayAccessCompositeOperators.fir.kt.txt | 17 +- .../arrayAccessOperators.fir.ir.txt | 42 +- .../arrayAccessOperators.fir.kt.txt | 17 +- .../compoundAssignmentOperators.fir.ir.txt | 42 +- .../compoundAssignmentOperators.fir.kt.txt | 17 +- .../fromKEEP/compareTo.fir.ir.txt | 106 +-- .../fromKEEP/compareTo.fir.kt.txt | 33 +- .../iteratorOperator.fir.ir.txt | 84 +-- .../iteratorOperator.fir.kt.txt | 33 +- .../unaryOperators.fir.ir.txt | 42 +- .../unaryOperators.fir.kt.txt | 17 +- .../inlineCollectionOfInlineClass.fir.ir.txt | 84 +-- .../inlineCollectionOfInlineClass.fir.kt.txt | 32 +- .../dataClassWithJvmRecord.fir.ir.txt | 42 +- .../dataClassWithJvmRecord.fir.kt.txt | 17 +- .../ir/irText/declarations/kt52677.fir.ir.txt | 42 +- .../ir/irText/declarations/kt52677.fir.kt.txt | 17 +- .../parameters/dataClassMembers.fir.ir.txt | 150 ---- .../parameters/dataClassMembers.fir.kt.txt | 59 -- .../parameters/dataClassMembers.kt | 1 + .../ir/irText/firProblems/ArrayMap.fir.ir.txt | 88 +-- .../ir/irText/firProblems/ArrayMap.fir.kt.txt | 27 +- .../irText/firProblems/MultiList.fir.ir.txt | 60 +- .../irText/firProblems/MultiList.fir.kt.txt | 23 +- .../firProblems/SignatureClash.fir.ir.txt | 42 +- .../firProblems/SignatureClash.fir.kt.txt | 17 +- .../irText/firProblems/dataObject.fir.ir.txt | 45 -- .../irText/firProblems/dataObject.fir.kt.txt | 28 - .../firProblems/valueClassEquals.fir.ir.txt | 42 +- .../firProblems/valueClassEquals.fir.kt.txt | 16 +- .../lambdas/destructuringInLambda.fir.ir.txt | 70 +- .../lambdas/destructuringInLambda.fir.kt.txt | 21 +- .../ir/irText/regressions/kt45236.fir.ir.txt | 88 +-- ...raysFromBuiltins.__kotlin.Array.fir.ir.txt | 16 +- ...sFromBuiltins.__kotlin.IntArray.fir.ir.txt | 16 +- .../enhancedNullabilityInForLoop.fir.ir.txt | 70 +- .../enhancedNullabilityInForLoop.fir.kt.txt | 20 +- .../typeAliasWithUnsafeVariance.fir.ir.txt | 42 +- .../typeAliasWithUnsafeVariance.fir.kt.txt | 17 +- .../ir/ClassicJvmIrTextTestGenerated.java | 12 +- .../klib/KlibIrTextTestCaseGenerated.java | 10 +- .../FirLightTreeJsIrTextTestGenerated.java | 12 +- .../test/fir/FirPsiJsIrTextTestGenerated.java | 12 +- .../test/ir/ClassicJsIrTextTestGenerated.java | 12 +- 81 files changed, 890 insertions(+), 4135 deletions(-) delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.kt.txt rename compiler/testData/ir/irText/{firProblems => classes/dataClasses}/dataObject.ir.txt (100%) rename compiler/testData/ir/irText/{firProblems => classes/dataClasses}/dataObject.kt (74%) rename compiler/testData/ir/irText/{firProblems => classes/dataClasses}/dataObject.kt.txt (100%) rename compiler/testData/ir/irText/{firProblems => classes/dataClasses}/dataObject.sig.kt.txt (100%) delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/kt49936.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/classes/inlineClass.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/inlineClass.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/firProblems/dataObject.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/firProblems/dataObject.fir.kt.txt diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt index a11dc642dc9..5429f71ddb7 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt @@ -64,12 +64,12 @@ class IrBuiltInsOverFir( private val any by createClass(kotlinIrPackage, IdSignatureValues.any, build = { modality = Modality.OPEN }) { createConstructor() + createMemberFunction("toString", stringType, modality = Modality.OPEN, isIntrinsicConst = false) + createMemberFunction("hashCode", intType, modality = Modality.OPEN, isIntrinsicConst = false) createMemberFunction( OperatorNameConventions.EQUALS, booleanType, "other" to anyNType, modality = Modality.OPEN, isOperator = true, isIntrinsicConst = false ) - createMemberFunction("hashCode", intType, modality = Modality.OPEN, isIntrinsicConst = false) - createMemberFunction("toString", stringType, modality = Modality.OPEN, isIntrinsicConst = false) } override val anyClass: IrClassSymbol get() = any.klass override val anyType: IrType get() = any.type diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt index 07ed57d58cc..aaded45aeaf 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt @@ -171,18 +171,16 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon } } - val equalsContributedFunction = contributedSyntheticFunctions[EQUALS] - if (equalsContributedFunction != null) { - result.add(equalsContributedFunction) - val equalsFunction = createSyntheticIrFunction( - EQUALS, - equalsContributedFunction, - components.irBuiltIns.booleanType, - otherParameterNeeded = true, - isOperator = true + val toStringContributedFunction = contributedSyntheticFunctions[TO_STRING] + if (toStringContributedFunction != null) { + result.add(toStringContributedFunction) + val toStringFunction = createSyntheticIrFunction( + TO_STRING, + toStringContributedFunction, + components.irBuiltIns.stringType, ) - irDataClassMembersGenerator.generateEqualsMethod(equalsFunction, properties) - irClass.declarations.add(equalsFunction) + irDataClassMembersGenerator.generateToStringMethod(toStringFunction, properties) + irClass.declarations.add(toStringFunction) } val hashcodeNameContributedFunction = contributedSyntheticFunctions[HASHCODE_NAME] @@ -197,16 +195,18 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon irClass.declarations.add(hashCodeFunction) } - val toStringContributedFunction = contributedSyntheticFunctions[TO_STRING] - if (toStringContributedFunction != null) { - result.add(toStringContributedFunction) - val toStringFunction = createSyntheticIrFunction( - TO_STRING, - toStringContributedFunction, - components.irBuiltIns.stringType, + val equalsContributedFunction = contributedSyntheticFunctions[EQUALS] + if (equalsContributedFunction != null) { + result.add(equalsContributedFunction) + val equalsFunction = createSyntheticIrFunction( + EQUALS, + equalsContributedFunction, + components.irBuiltIns.booleanType, + otherParameterNeeded = true, + isOperator = true ) - irDataClassMembersGenerator.generateToStringMethod(toStringFunction, properties) - irClass.declarations.add(toStringFunction) + irDataClassMembersGenerator.generateEqualsMethod(equalsFunction, properties) + irClass.declarations.add(equalsFunction) } return result 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 600cbeffb55..8d49b3c73c1 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 @@ -355,6 +355,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2624,12 +2630,6 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI runTest("compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() 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 995c7e496ca..c908a0b548a 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 @@ -355,6 +355,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2624,12 +2630,6 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { runTest("compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() throws Exception { diff --git a/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt b/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt index 0e1852b28d0..7e261b32704 100644 --- a/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt +++ b/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt @@ -54,6 +54,27 @@ FILE fqName: fileName:/recordWithCompanion.kt RETURN type=kotlin.Nothing from='public final fun copy (id: kotlin.String): .Tag declared in .Tag' CONSTRUCTOR_CALL 'public constructor (id: kotlin.String) declared in .Tag' type=.Tag origin=null id: GET_VAR 'id: kotlin.String declared in .Tag.copy' type=kotlin.String origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Tag) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Tag + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Tag' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Tag(" + CONST String type=kotlin.String value="id=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .Tag declared in .Tag.toString' type=.Tag origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Tag) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Tag + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Tag' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .Tag declared in .Tag.hashCode' type=.Tag origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Tag, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -88,27 +109,6 @@ FILE fqName: fileName:/recordWithCompanion.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Tag' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Tag) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Tag - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Tag' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Tag declared in .Tag.hashCode' type=.Tag origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Tag) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Tag - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Tag' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Tag(" - CONST String type=kotlin.String value="id=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Tag declared in .Tag.toString' type=.Tag origin=null - CONST String type=kotlin.String value=")" FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.ir.txt deleted file mode 100644 index 229f1d8af9a..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.ir.txt +++ /dev/null @@ -1,652 +0,0 @@ -FILE fqName: fileName:/dataClassWithArrayMembers.kt - CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 - CONSTRUCTOR visibility:public <> (stringArray:kotlin.Array, charArray:kotlin.CharArray, booleanArray:kotlin.BooleanArray, byteArray:kotlin.ByteArray, shortArray:kotlin.ShortArray, intArray:kotlin.IntArray, longArray:kotlin.LongArray, floatArray:kotlin.FloatArray, doubleArray:kotlin.DoubleArray) returnType:.Test1 [primary] - VALUE_PARAMETER name:stringArray index:0 type:kotlin.Array - VALUE_PARAMETER name:charArray index:1 type:kotlin.CharArray - VALUE_PARAMETER name:booleanArray index:2 type:kotlin.BooleanArray - VALUE_PARAMETER name:byteArray index:3 type:kotlin.ByteArray - VALUE_PARAMETER name:shortArray index:4 type:kotlin.ShortArray - VALUE_PARAMETER name:intArray index:5 type:kotlin.IntArray - VALUE_PARAMETER name:longArray index:6 type:kotlin.LongArray - VALUE_PARAMETER name:floatArray index:7 type:kotlin.FloatArray - VALUE_PARAMETER name:doubleArray index:8 type:kotlin.DoubleArray - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:stringArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final] - EXPRESSION_BODY - GET_VAR 'stringArray: kotlin.Array declared in .Test1.' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Array - correspondingProperty: PROPERTY name:stringArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:charArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'charArray: kotlin.CharArray declared in .Test1.' type=kotlin.CharArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.CharArray - correspondingProperty: PROPERTY name:charArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.CharArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:booleanArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'booleanArray: kotlin.BooleanArray declared in .Test1.' type=kotlin.BooleanArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.BooleanArray - correspondingProperty: PROPERTY name:booleanArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.BooleanArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:byteArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'byteArray: kotlin.ByteArray declared in .Test1.' type=kotlin.ByteArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.ByteArray - correspondingProperty: PROPERTY name:byteArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.ByteArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:shortArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'shortArray: kotlin.ShortArray declared in .Test1.' type=kotlin.ShortArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.ShortArray - correspondingProperty: PROPERTY name:shortArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.ShortArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:intArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'intArray: kotlin.IntArray declared in .Test1.' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.IntArray - correspondingProperty: PROPERTY name:intArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.IntArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:longArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'longArray: kotlin.LongArray declared in .Test1.' type=kotlin.LongArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.LongArray - correspondingProperty: PROPERTY name:longArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.LongArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:floatArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'floatArray: kotlin.FloatArray declared in .Test1.' type=kotlin.FloatArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.FloatArray - correspondingProperty: PROPERTY name:floatArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.FloatArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:doubleArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final] - EXPRESSION_BODY - GET_VAR 'doubleArray: kotlin.DoubleArray declared in .Test1.' type=kotlin.DoubleArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.DoubleArray - correspondingProperty: PROPERTY name:doubleArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.DoubleArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Array [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Array declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component1' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.CharArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.CharArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component2' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component3 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.BooleanArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.BooleanArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component3' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component4 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.ByteArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component4 (): kotlin.ByteArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component4' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component5 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.ShortArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component5 (): kotlin.ShortArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component5' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component6 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.IntArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component6 (): kotlin.IntArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component6' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component7 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.LongArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component7 (): kotlin.LongArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component7' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component8 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.FloatArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component8 (): kotlin.FloatArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component8' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component9 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.DoubleArray [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component9 (): kotlin.DoubleArray declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component9' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test1, stringArray:kotlin.Array, charArray:kotlin.CharArray, booleanArray:kotlin.BooleanArray, byteArray:kotlin.ByteArray, shortArray:kotlin.ShortArray, intArray:kotlin.IntArray, longArray:kotlin.LongArray, floatArray:kotlin.FloatArray, doubleArray:kotlin.DoubleArray) returnType:.Test1 - $this: VALUE_PARAMETER name: type:.Test1 - VALUE_PARAMETER name:stringArray index:0 type:kotlin.Array - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:charArray index:1 type:kotlin.CharArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:booleanArray index:2 type:kotlin.BooleanArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:byteArray index:3 type:kotlin.ByteArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:shortArray index:4 type:kotlin.ShortArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:intArray index:5 type:kotlin.IntArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:longArray index:6 type:kotlin.LongArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:floatArray index:7 type:kotlin.FloatArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:doubleArray index:8 type:kotlin.DoubleArray - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (stringArray: kotlin.Array, charArray: kotlin.CharArray, booleanArray: kotlin.BooleanArray, byteArray: kotlin.ByteArray, shortArray: kotlin.ShortArray, intArray: kotlin.IntArray, longArray: kotlin.LongArray, floatArray: kotlin.FloatArray, doubleArray: kotlin.DoubleArray): .Test1 declared in .Test1' - CONSTRUCTOR_CALL 'public constructor (stringArray: kotlin.Array, charArray: kotlin.CharArray, booleanArray: kotlin.BooleanArray, byteArray: kotlin.ByteArray, shortArray: kotlin.ShortArray, intArray: kotlin.IntArray, longArray: kotlin.LongArray, floatArray: kotlin.FloatArray, doubleArray: kotlin.DoubleArray) declared in .Test1' type=.Test1 origin=null - stringArray: GET_VAR 'stringArray: kotlin.Array declared in .Test1.copy' type=kotlin.Array origin=null - charArray: GET_VAR 'charArray: kotlin.CharArray declared in .Test1.copy' type=kotlin.CharArray origin=null - booleanArray: GET_VAR 'booleanArray: kotlin.BooleanArray declared in .Test1.copy' type=kotlin.BooleanArray origin=null - byteArray: GET_VAR 'byteArray: kotlin.ByteArray declared in .Test1.copy' type=kotlin.ByteArray origin=null - shortArray: GET_VAR 'shortArray: kotlin.ShortArray declared in .Test1.copy' type=kotlin.ShortArray origin=null - intArray: GET_VAR 'intArray: kotlin.IntArray declared in .Test1.copy' type=kotlin.IntArray origin=null - longArray: GET_VAR 'longArray: kotlin.LongArray declared in .Test1.copy' type=kotlin.LongArray origin=null - floatArray: GET_VAR 'floatArray: kotlin.FloatArray declared in .Test1.copy' type=kotlin.FloatArray origin=null - doubleArray: GET_VAR 'doubleArray: kotlin.DoubleArray declared in .Test1.copy' type=kotlin.DoubleArray origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test1, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test1 - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Test1 [val] - TYPE_OP type=.Test1 origin=CAST typeOperand=.Test1 - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test1) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' - GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test1) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test1(" - CONST String type=kotlin.String value="stringArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array visibility:private [final]' type=kotlin.Array origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="charArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="booleanArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="byteArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="shortArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="intArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="longArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="floatArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="doubleArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.Test2> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (genericArray:kotlin.Array.Test2>) returnType:.Test2.Test2> [primary] - VALUE_PARAMETER name:genericArray index:0 type:kotlin.Array.Test2> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:genericArray visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final] - EXPRESSION_BODY - GET_VAR 'genericArray: kotlin.Array.Test2> declared in .Test2.' type=kotlin.Array.Test2> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2.Test2>) returnType:kotlin.Array.Test2> - correspondingProperty: PROPERTY name:genericArray visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array.Test2> declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test2.Test2>) returnType:kotlin.Array.Test2> [operator] - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Array.Test2> declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.component1' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test2.Test2>, genericArray:kotlin.Array.Test2>) returnType:.Test2.Test2> - $this: VALUE_PARAMETER name: type:.Test2.Test2> - VALUE_PARAMETER name:genericArray index:0 type:kotlin.Array.Test2> - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.copy' type=.Test2.Test2> origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (genericArray: kotlin.Array.Test2>): .Test2.Test2> declared in .Test2' - CONSTRUCTOR_CALL 'public constructor (genericArray: kotlin.Array.Test2>) declared in .Test2' type=.Test2.Test2> origin=null - : T of .Test2 - genericArray: GET_VAR 'genericArray: kotlin.Array.Test2> declared in .Test2.copy' type=kotlin.Array.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test2.Test2>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test2.Test2> - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Test2.Test2> [val] - TYPE_OP type=.Test2.Test2> origin=CAST typeOperand=.Test2.Test2> - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR 'val tmp_1: .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test2.Test2>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' - CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.hashCode' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test2.Test2>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test2(" - CONST String type=kotlin.String value="genericArray=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array.Test2> visibility:private [final]' type=kotlin.Array.Test2> origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.toString' type=.Test2.Test2> origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 - CONSTRUCTOR visibility:public <> (anyArrayN:kotlin.Array?) returnType:.Test3 [primary] - VALUE_PARAMETER name:anyArrayN index:0 type:kotlin.Array? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:anyArrayN visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'anyArrayN: kotlin.Array? declared in .Test3.' type=kotlin.Array? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Array? - correspondingProperty: PROPERTY name:anyArrayN visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Array? [operator] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Array? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.component1' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test3, anyArrayN:kotlin.Array?) returnType:.Test3 - $this: VALUE_PARAMETER name: type:.Test3 - VALUE_PARAMETER name:anyArrayN index:0 type:kotlin.Array? - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.copy' type=.Test3 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (anyArrayN: kotlin.Array?): .Test3 declared in .Test3' - CONSTRUCTOR_CALL 'public constructor (anyArrayN: kotlin.Array?) declared in .Test3' type=.Test3 origin=null - anyArrayN: GET_VAR 'anyArrayN: kotlin.Array? declared in .Test3.copy' type=kotlin.Array? origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test3, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test3 - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Test3 [val] - TYPE_OP type=.Test3 origin=CAST typeOperand=.Test3 - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR 'val tmp_2: .Test3 declared in .Test3.equals' type=.Test3 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test3) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun dataClassArrayMemberHashCode (arg0: kotlin.Any): kotlin.Int declared in kotlin.internal.ir' type=kotlin.Int origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test3) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test3(" - CONST String type=kotlin.String value="anyArrayN=" - CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array? visibility:private [final]' type=kotlin.Array? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.toString' type=.Test3 origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.kt.txt deleted file mode 100644 index 81085535665..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.fir.kt.txt +++ /dev/null @@ -1,228 +0,0 @@ -data class Test1 { - constructor(stringArray: Array, charArray: CharArray, booleanArray: BooleanArray, byteArray: ByteArray, shortArray: ShortArray, intArray: IntArray, longArray: LongArray, floatArray: FloatArray, doubleArray: DoubleArray) /* primary */ { - super/*Any*/() - /* () */ - - } - - val stringArray: Array - field = stringArray - get - - val charArray: CharArray - field = charArray - get - - val booleanArray: BooleanArray - field = booleanArray - get - - val byteArray: ByteArray - field = byteArray - get - - val shortArray: ShortArray - field = shortArray - get - - val intArray: IntArray - field = intArray - get - - val longArray: LongArray - field = longArray - get - - val floatArray: FloatArray - field = floatArray - get - - val doubleArray: DoubleArray - field = doubleArray - get - - operator fun component1(): Array { - return .#stringArray - } - - operator fun component2(): CharArray { - return .#charArray - } - - operator fun component3(): BooleanArray { - return .#booleanArray - } - - operator fun component4(): ByteArray { - return .#byteArray - } - - operator fun component5(): ShortArray { - return .#shortArray - } - - operator fun component6(): IntArray { - return .#intArray - } - - operator fun component7(): LongArray { - return .#longArray - } - - operator fun component8(): FloatArray { - return .#floatArray - } - - operator fun component9(): DoubleArray { - return .#doubleArray - } - - fun copy(stringArray: Array = .#stringArray, charArray: CharArray = .#charArray, booleanArray: BooleanArray = .#booleanArray, byteArray: ByteArray = .#byteArray, shortArray: ShortArray = .#shortArray, intArray: IntArray = .#intArray, longArray: LongArray = .#longArray, floatArray: FloatArray = .#floatArray, doubleArray: DoubleArray = .#doubleArray): Test1 { - return Test1(stringArray = stringArray, charArray = charArray, booleanArray = booleanArray, byteArray = byteArray, shortArray = shortArray, intArray = intArray, longArray = longArray, floatArray = floatArray, doubleArray = doubleArray) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test1 -> return false - } - val tmp0_other_with_cast: Test1 = other as Test1 - when { - EQEQ(arg0 = .#stringArray, arg1 = tmp0_other_with_cast.#stringArray).not() -> return false - } - when { - EQEQ(arg0 = .#charArray, arg1 = tmp0_other_with_cast.#charArray).not() -> return false - } - when { - EQEQ(arg0 = .#booleanArray, arg1 = tmp0_other_with_cast.#booleanArray).not() -> return false - } - when { - EQEQ(arg0 = .#byteArray, arg1 = tmp0_other_with_cast.#byteArray).not() -> return false - } - when { - EQEQ(arg0 = .#shortArray, arg1 = tmp0_other_with_cast.#shortArray).not() -> return false - } - when { - EQEQ(arg0 = .#intArray, arg1 = tmp0_other_with_cast.#intArray).not() -> return false - } - when { - EQEQ(arg0 = .#longArray, arg1 = tmp0_other_with_cast.#longArray).not() -> return false - } - when { - EQEQ(arg0 = .#floatArray, arg1 = tmp0_other_with_cast.#floatArray).not() -> return false - } - when { - EQEQ(arg0 = .#doubleArray, arg1 = tmp0_other_with_cast.#doubleArray).not() -> return false - } - return true - } - - override fun hashCode(): Int { - var result: Int = dataClassArrayMemberHashCode(arg0 = .#stringArray) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#charArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#booleanArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#byteArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#shortArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#intArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#longArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#floatArray)) - result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = .#doubleArray)) - return result - } - - override fun toString(): String { - return "Test1(" + "stringArray=" + dataClassArrayMemberToString(arg0 = .#stringArray) + ", " + "charArray=" + dataClassArrayMemberToString(arg0 = .#charArray) + ", " + "booleanArray=" + dataClassArrayMemberToString(arg0 = .#booleanArray) + ", " + "byteArray=" + dataClassArrayMemberToString(arg0 = .#byteArray) + ", " + "shortArray=" + dataClassArrayMemberToString(arg0 = .#shortArray) + ", " + "intArray=" + dataClassArrayMemberToString(arg0 = .#intArray) + ", " + "longArray=" + dataClassArrayMemberToString(arg0 = .#longArray) + ", " + "floatArray=" + dataClassArrayMemberToString(arg0 = .#floatArray) + ", " + "doubleArray=" + dataClassArrayMemberToString(arg0 = .#doubleArray) + ")" - } - -} - -data class Test2 { - constructor(genericArray: Array) /* primary */ { - super/*Any*/() - /* () */ - - } - - val genericArray: Array - field = genericArray - get - - operator fun component1(): Array { - return .#genericArray - } - - fun copy(genericArray: Array = .#genericArray): Test2 { - return Test2(genericArray = genericArray) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test2 -> return false - } - val tmp0_other_with_cast: Test2 = other as Test2 - when { - EQEQ(arg0 = .#genericArray, arg1 = tmp0_other_with_cast.#genericArray).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return dataClassArrayMemberHashCode(arg0 = .#genericArray) - } - - override fun toString(): String { - return "Test2(" + "genericArray=" + dataClassArrayMemberToString(arg0 = .#genericArray) + ")" - } - -} - -data class Test3 { - constructor(anyArrayN: Array?) /* primary */ { - super/*Any*/() - /* () */ - - } - - val anyArrayN: Array? - field = anyArrayN - get - - operator fun component1(): Array? { - return .#anyArrayN - } - - fun copy(anyArrayN: Array? = .#anyArrayN): Test3 { - return Test3(anyArrayN = anyArrayN) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test3 -> return false - } - val tmp0_other_with_cast: Test3 = other as Test3 - when { - EQEQ(arg0 = .#anyArrayN, arg1 = tmp0_other_with_cast.#anyArrayN).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#anyArrayN, arg1 = null) -> 0 - else -> dataClassArrayMemberHashCode(arg0 = .#anyArrayN) - } - } - - override fun toString(): String { - return "Test3(" + "anyArrayN=" + dataClassArrayMemberToString(arg0 = .#anyArrayN) + ")" - } - -} diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt index 6d66563bdf1..010b6da0101 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL data class Test1( val stringArray: Array, val charArray: CharArray, diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.ir.txt deleted file mode 100644 index 1959b433636..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.ir.txt +++ /dev/null @@ -1,524 +0,0 @@ -FILE fqName: fileName:/dataClasses.kt - CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 - CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:.Test1 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - VALUE_PARAMETER name:y index:1 type:kotlin.String - VALUE_PARAMETER name:z index:2 type:kotlin.Any - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .Test1.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:y visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final] - EXPRESSION_BODY - GET_VAR 'y: kotlin.String declared in .Test1.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.String - correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:z visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final] - EXPRESSION_BODY - GET_VAR 'z: kotlin.Any declared in .Test1.' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Any - correspondingProperty: PROPERTY name:z visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Int [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component1' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.String [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component2' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component3 visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Any [operator] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.Any declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.component3' type=.Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test1, x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:.Test1 - $this: VALUE_PARAMETER name: type:.Test1 - VALUE_PARAMETER name:x index:0 type:kotlin.Int - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:y index:1 type:kotlin.String - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - VALUE_PARAMETER name:z index:2 type:kotlin.Any - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.copy' type=.Test1 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Int, y: kotlin.String, z: kotlin.Any): .Test1 declared in .Test1' - CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int, y: kotlin.String, z: kotlin.Any) declared in .Test1' type=.Test1 origin=null - x: GET_VAR 'x: kotlin.Int declared in .Test1.copy' type=kotlin.Int origin=null - y: GET_VAR 'y: kotlin.String declared in .Test1.copy' type=kotlin.String origin=null - z: GET_VAR 'z: kotlin.Any declared in .Test1.copy' type=kotlin.Any origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test1, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test1 - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Test1 [val] - TYPE_OP type=.Test1 origin=CAST typeOperand=.Test1 - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.equals' type=.Test1 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR 'val tmp_0: .Test1 declared in .Test1.equals' type=.Test1 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test1) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.hashCode' type=.Test1 origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' - GET_VAR 'var result: kotlin.Int declared in .Test1.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test1) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test1(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="y=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="z=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.toString' type=.Test1 origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 - CONSTRUCTOR visibility:public <> (x:kotlin.Any?) returnType:.Test2 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Any? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Any? declared in .Test2.' type=kotlin.Any? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Any? - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any? declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Any? [operator] - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Any? declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.component1' type=.Test2 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test2, x:kotlin.Any?) returnType:.Test2 - $this: VALUE_PARAMETER name: type:.Test2 - VALUE_PARAMETER name:x index:0 type:kotlin.Any? - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.copy' type=.Test2 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Any?): .Test2 declared in .Test2' - CONSTRUCTOR_CALL 'public constructor (x: kotlin.Any?) declared in .Test2' type=.Test2 origin=null - x: GET_VAR 'x: kotlin.Any? declared in .Test2.copy' type=kotlin.Any? origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test2, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test2 declared in .Test2.equals' type=.Test2 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test2 - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Test2 [val] - TYPE_OP type=.Test2 origin=CAST typeOperand=.Test2 - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.equals' type=.Test2 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR 'val tmp_1: .Test2 declared in .Test2.equals' type=.Test2 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.hashCode' type=.Test2 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.hashCode' type=.Test2 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test2(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.toString' type=.Test2 origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 - CONSTRUCTOR visibility:public <> (d:kotlin.Double, dn:kotlin.Double?, f:kotlin.Float, df:kotlin.Float?) returnType:.Test3 [primary] - VALUE_PARAMETER name:d index:0 type:kotlin.Double - VALUE_PARAMETER name:dn index:1 type:kotlin.Double? - VALUE_PARAMETER name:f index:2 type:kotlin.Float - VALUE_PARAMETER name:df index:3 type:kotlin.Float? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:d visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final] - EXPRESSION_BODY - GET_VAR 'd: kotlin.Double declared in .Test3.' type=kotlin.Double origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Double - correspondingProperty: PROPERTY name:d visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Double declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - PROPERTY name:dn visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'dn: kotlin.Double? declared in .Test3.' type=kotlin.Double? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Double? - correspondingProperty: PROPERTY name:dn visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Double? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - PROPERTY name:f visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final] - EXPRESSION_BODY - GET_VAR 'f: kotlin.Float declared in .Test3.' type=kotlin.Float origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Float - correspondingProperty: PROPERTY name:f visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Float declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - PROPERTY name:df visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'df: kotlin.Float? declared in .Test3.' type=kotlin.Float? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Float? - correspondingProperty: PROPERTY name:df visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Float? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Double [operator] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Double declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.component1' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Double? [operator] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.Double? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.component2' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component3 visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Float [operator] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.Float declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.component3' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component4 visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Float? [operator] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component4 (): kotlin.Float? declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.component4' type=.Test3 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test3, d:kotlin.Double, dn:kotlin.Double?, f:kotlin.Float, df:kotlin.Float?) returnType:.Test3 - $this: VALUE_PARAMETER name: type:.Test3 - VALUE_PARAMETER name:d index:0 type:kotlin.Double - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.copy' type=.Test3 origin=null - VALUE_PARAMETER name:dn index:1 type:kotlin.Double? - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.copy' type=.Test3 origin=null - VALUE_PARAMETER name:f index:2 type:kotlin.Float - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.copy' type=.Test3 origin=null - VALUE_PARAMETER name:df index:3 type:kotlin.Float? - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.copy' type=.Test3 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (d: kotlin.Double, dn: kotlin.Double?, f: kotlin.Float, df: kotlin.Float?): .Test3 declared in .Test3' - CONSTRUCTOR_CALL 'public constructor (d: kotlin.Double, dn: kotlin.Double?, f: kotlin.Float, df: kotlin.Float?) declared in .Test3' type=.Test3 origin=null - d: GET_VAR 'd: kotlin.Double declared in .Test3.copy' type=kotlin.Double origin=null - dn: GET_VAR 'dn: kotlin.Double? declared in .Test3.copy' type=kotlin.Double? origin=null - f: GET_VAR 'f: kotlin.Float declared in .Test3.copy' type=kotlin.Float origin=null - df: GET_VAR 'df: kotlin.Float? declared in .Test3.copy' type=kotlin.Float? origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test3, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test3 - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Test3 [val] - TYPE_OP type=.Test3 origin=CAST typeOperand=.Test3 - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR 'val tmp_2: .Test3 declared in .Test3.equals' type=.Test3 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR 'val tmp_2: .Test3 declared in .Test3.equals' type=.Test3 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR 'val tmp_2: .Test3 declared in .Test3.equals' type=.Test3 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.equals' type=.Test3 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR 'val tmp_2: .Test3 declared in .Test3.equals' type=.Test3 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test3) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Double' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - SET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Float' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.hashCode' type=.Test3 origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' - GET_VAR 'var result: kotlin.Int declared in .Test3.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test3) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test3(" - CONST String type=kotlin.String value="d=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.toString' type=.Test3 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="dn=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.toString' type=.Test3 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="f=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.toString' type=.Test3 origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="df=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.toString' type=.Test3 origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.kt.txt deleted file mode 100644 index 3baa524ff16..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.fir.kt.txt +++ /dev/null @@ -1,199 +0,0 @@ -data class Test1 { - constructor(x: Int, y: String, z: Any) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: Int - field = x - get - - val y: String - field = y - get - - val z: Any - field = z - get - - operator fun component1(): Int { - return .#x - } - - operator fun component2(): String { - return .#y - } - - operator fun component3(): Any { - return .#z - } - - fun copy(x: Int = .#x, y: String = .#y, z: Any = .#z): Test1 { - return Test1(x = x, y = y, z = z) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test1 -> return false - } - val tmp0_other_with_cast: Test1 = other as Test1 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false - } - when { - EQEQ(arg0 = .#z, arg1 = tmp0_other_with_cast.#z).not() -> return false - } - return true - } - - override fun hashCode(): Int { - var result: Int = .#x.hashCode() - result = result.times(other = 31).plus(other = .#y.hashCode()) - result = result.times(other = 31).plus(other = .#z.hashCode()) - return result - } - - override fun toString(): String { - return "Test1(" + "x=" + .#x + ", " + "y=" + .#y + ", " + "z=" + .#z + ")" - } - -} - -data class Test2 { - constructor(x: Any?) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: Any? - field = x - get - - operator fun component1(): Any? { - return .#x - } - - fun copy(x: Any? = .#x): Test2 { - return Test2(x = x) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test2 -> return false - } - val tmp0_other_with_cast: Test2 = other as Test2 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#x, arg1 = null) -> 0 - else -> .#x.hashCode() - } - } - - override fun toString(): String { - return "Test2(" + "x=" + .#x + ")" - } - -} - -data class Test3 { - constructor(d: Double, dn: Double?, f: Float, df: Float?) /* primary */ { - super/*Any*/() - /* () */ - - } - - val d: Double - field = d - get - - val dn: Double? - field = dn - get - - val f: Float - field = f - get - - val df: Float? - field = df - get - - operator fun component1(): Double { - return .#d - } - - operator fun component2(): Double? { - return .#dn - } - - operator fun component3(): Float { - return .#f - } - - operator fun component4(): Float? { - return .#df - } - - fun copy(d: Double = .#d, dn: Double? = .#dn, f: Float = .#f, df: Float? = .#df): Test3 { - return Test3(d = d, dn = dn, f = f, df = df) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test3 -> return false - } - val tmp0_other_with_cast: Test3 = other as Test3 - when { - EQEQ(arg0 = .#d, arg1 = tmp0_other_with_cast.#d).not() -> return false - } - when { - EQEQ(arg0 = .#dn, arg1 = tmp0_other_with_cast.#dn).not() -> return false - } - when { - EQEQ(arg0 = .#f, arg1 = tmp0_other_with_cast.#f).not() -> return false - } - when { - EQEQ(arg0 = .#df, arg1 = tmp0_other_with_cast.#df).not() -> return false - } - return true - } - - override fun hashCode(): Int { - var result: Int = .#d.hashCode() - result = result.times(other = 31).plus(other = when { - EQEQ(arg0 = .#dn, arg1 = null) -> 0 - else -> .#dn.hashCode() - }) - result = result.times(other = 31).plus(other = .#f.hashCode()) - result = result.times(other = 31).plus(other = when { - EQEQ(arg0 = .#df, arg1 = null) -> 0 - else -> .#df.hashCode() - }) - return result - } - - override fun toString(): String { - return "Test3(" + "d=" + .#d + ", " + "dn=" + .#dn + ", " + "f=" + .#f + ", " + "df=" + .#df + ")" - } - -} diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt index 718907ddc5b..5739f373657 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL data class Test1(val x: Int, val y: String, val z: Any) data class Test2(val x: Any?) diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.ir.txt deleted file mode 100644 index 639850825e6..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.ir.txt +++ /dev/null @@ -1,372 +0,0 @@ -FILE fqName: fileName:/dataClassesGeneric.kt - CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1.Test1> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (x:T of .Test1) returnType:.Test1.Test1> [primary] - VALUE_PARAMETER name:x index:0 type:T of .Test1 - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: T of .Test1 declared in .Test1.' type=T of .Test1 origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1.Test1>) returnType:T of .Test1 - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1.Test1> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Test1 declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.' type=.Test1.Test1> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test1.Test1>) returnType:T of .Test1 [operator] - $this: VALUE_PARAMETER name: type:.Test1.Test1> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): T of .Test1 declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.component1' type=.Test1.Test1> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test1.Test1>, x:T of .Test1) returnType:.Test1.Test1> - $this: VALUE_PARAMETER name: type:.Test1.Test1> - VALUE_PARAMETER name:x index:0 type:T of .Test1 - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.copy' type=.Test1.Test1> origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: T of .Test1): .Test1.Test1> declared in .Test1' - CONSTRUCTOR_CALL 'public constructor (x: T of .Test1) declared in .Test1' type=.Test1.Test1> origin=null - : T of .Test1 - x: GET_VAR 'x: T of .Test1 declared in .Test1.copy' type=T of .Test1 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test1.Test1>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1.Test1> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test1.Test1> declared in .Test1.equals' type=.Test1.Test1> origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test1.Test1> - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Test1.Test1> [val] - TYPE_OP type=.Test1.Test1> origin=CAST typeOperand=.Test1.Test1> - GET_VAR 'other: kotlin.Any? declared in .Test1.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.equals' type=.Test1.Test1> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR 'val tmp_0: .Test1.Test1> declared in .Test1.equals' type=.Test1.Test1> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test1' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test1.Test1>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1.Test1> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.hashCode' type=.Test1.Test1> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.hashCode' type=.Test1.Test1> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test1.Test1>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test1.Test1> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test1(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test1 visibility:private [final]' type=T of .Test1 origin=null - receiver: GET_VAR ': .Test1.Test1> declared in .Test1.toString' type=.Test1.Test1> origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.Test2> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Number] reified:false - CONSTRUCTOR visibility:public <> (x:T of .Test2) returnType:.Test2.Test2> [primary] - VALUE_PARAMETER name:x index:0 type:T of .Test2 - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: T of .Test2 declared in .Test2.' type=T of .Test2 origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2.Test2>) returnType:T of .Test2 - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Test2 declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test2.Test2>) returnType:T of .Test2 [operator] - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): T of .Test2 declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.component1' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test2.Test2>, x:T of .Test2) returnType:.Test2.Test2> - $this: VALUE_PARAMETER name: type:.Test2.Test2> - VALUE_PARAMETER name:x index:0 type:T of .Test2 - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.copy' type=.Test2.Test2> origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: T of .Test2): .Test2.Test2> declared in .Test2' - CONSTRUCTOR_CALL 'public constructor (x: T of .Test2) declared in .Test2' type=.Test2.Test2> origin=null - : T of .Test2 - x: GET_VAR 'x: T of .Test2 declared in .Test2.copy' type=T of .Test2 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test2.Test2>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test2.Test2> - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Test2.Test2> [val] - TYPE_OP type=.Test2.Test2> origin=CAST typeOperand=.Test2.Test2> - GET_VAR 'other: kotlin.Any? declared in .Test2.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR 'val tmp_1: .Test2.Test2> declared in .Test2.equals' type=.Test2.Test2> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test2' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test2.Test2>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.hashCode' type=.Test2.Test2> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test2.Test2>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test2.Test2> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test2(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test2 visibility:private [final]' type=T of .Test2 origin=null - receiver: GET_VAR ': .Test2.Test2> declared in .Test2.toString' type=.Test2.Test2> origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3.Test3> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (x:kotlin.collections.List.Test3>) returnType:.Test3.Test3> [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.collections.List.Test3> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.collections.List.Test3> declared in .Test3.' type=kotlin.collections.List.Test3> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3.Test3>) returnType:kotlin.collections.List.Test3> - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3.Test3> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List.Test3> declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.' type=.Test3.Test3> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test3.Test3>) returnType:kotlin.collections.List.Test3> [operator] - $this: VALUE_PARAMETER name: type:.Test3.Test3> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.collections.List.Test3> declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.component1' type=.Test3.Test3> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test3.Test3>, x:kotlin.collections.List.Test3>) returnType:.Test3.Test3> - $this: VALUE_PARAMETER name: type:.Test3.Test3> - VALUE_PARAMETER name:x index:0 type:kotlin.collections.List.Test3> - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.copy' type=.Test3.Test3> origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.collections.List.Test3>): .Test3.Test3> declared in .Test3' - CONSTRUCTOR_CALL 'public constructor (x: kotlin.collections.List.Test3>) declared in .Test3' type=.Test3.Test3> origin=null - : T of .Test3 - x: GET_VAR 'x: kotlin.collections.List.Test3> declared in .Test3.copy' type=kotlin.collections.List.Test3> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test3.Test3>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3.Test3> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test3.Test3> declared in .Test3.equals' type=.Test3.Test3> origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test3.Test3> - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Test3.Test3> [val] - TYPE_OP type=.Test3.Test3> origin=CAST typeOperand=.Test3.Test3> - GET_VAR 'other: kotlin.Any? declared in .Test3.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.equals' type=.Test3.Test3> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR 'val tmp_2: .Test3.Test3> declared in .Test3.equals' type=.Test3.Test3> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test3' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test3.Test3>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3.Test3> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.List' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.hashCode' type=.Test3.Test3> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test3.Test3>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test3.Test3> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test3(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List.Test3> visibility:private [final]' type=kotlin.collections.List.Test3> origin=null - receiver: GET_VAR ': .Test3.Test3> declared in .Test3.toString' type=.Test3.Test3> origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:Test4 modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 - CONSTRUCTOR visibility:public <> (x:kotlin.collections.List) returnType:.Test4 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.collections.List - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test4 modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.collections.List declared in .Test4.' type=kotlin.collections.List origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test4) returnType:kotlin.collections.List - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test4 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.collections.List declared in .Test4' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.' type=.Test4 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test4) returnType:kotlin.collections.List [operator] - $this: VALUE_PARAMETER name: type:.Test4 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.collections.List declared in .Test4' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.component1' type=.Test4 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test4, x:kotlin.collections.List) returnType:.Test4 - $this: VALUE_PARAMETER name: type:.Test4 - VALUE_PARAMETER name:x index:0 type:kotlin.collections.List - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.copy' type=.Test4 origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.collections.List): .Test4 declared in .Test4' - CONSTRUCTOR_CALL 'public constructor (x: kotlin.collections.List) declared in .Test4' type=.Test4 origin=null - x: GET_VAR 'x: kotlin.collections.List declared in .Test4.copy' type=kotlin.collections.List origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test4, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test4 - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test4 declared in .Test4.equals' type=.Test4 origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test4.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test4' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test4 - GET_VAR 'other: kotlin.Any? declared in .Test4.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test4' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:.Test4 [val] - TYPE_OP type=.Test4 origin=CAST typeOperand=.Test4 - GET_VAR 'other: kotlin.Any? declared in .Test4.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.equals' type=.Test4 origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR 'val tmp_3: .Test4 declared in .Test4.equals' type=.Test4 origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test4' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test4' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test4) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test4 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test4' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.List' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.hashCode' type=.Test4 origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test4) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test4 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test4' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test4(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List visibility:private [final]' type=kotlin.collections.List origin=null - receiver: GET_VAR ': .Test4 declared in .Test4.toString' type=.Test4 origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.kt.txt deleted file mode 100644 index 8c6a5bc273c..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.fir.kt.txt +++ /dev/null @@ -1,174 +0,0 @@ -data class Test1 { - constructor(x: T) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: T - field = x - get - - operator fun component1(): T { - return .#x - } - - fun copy(x: T = .#x): Test1 { - return Test1(x = x) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test1 -> return false - } - val tmp0_other_with_cast: Test1 = other as Test1 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#x, arg1 = null) -> 0 - else -> .#x.hashCode() - } - } - - override fun toString(): String { - return "Test1(" + "x=" + .#x + ")" - } - -} - -data class Test2 { - constructor(x: T) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: T - field = x - get - - operator fun component1(): T { - return .#x - } - - fun copy(x: T = .#x): Test2 { - return Test2(x = x) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test2 -> return false - } - val tmp0_other_with_cast: Test2 = other as Test2 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "Test2(" + "x=" + .#x + ")" - } - -} - -data class Test3 { - constructor(x: List) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: List - field = x - get - - operator fun component1(): List { - return .#x - } - - fun copy(x: List = .#x): Test3 { - return Test3(x = x) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test3 -> return false - } - val tmp0_other_with_cast: Test3 = other as Test3 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "Test3(" + "x=" + .#x + ")" - } - -} - -data class Test4 { - constructor(x: List) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: List - field = x - get - - operator fun component1(): List { - return .#x - } - - fun copy(x: List = .#x): Test4 { - return Test4(x = x) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test4 -> return false - } - val tmp0_other_with_cast: Test4 = other as Test4 - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "Test4(" + "x=" + .#x + ")" - } - -} diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt index 4c2586305de..64d47a136b5 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL data class Test1(val x: T) data class Test2(val x: T) diff --git a/compiler/testData/ir/irText/firProblems/dataObject.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/dataObject.ir.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/dataObject.ir.txt rename to compiler/testData/ir/irText/classes/dataClasses/dataObject.ir.txt diff --git a/compiler/testData/ir/irText/firProblems/dataObject.kt b/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt similarity index 74% rename from compiler/testData/ir/irText/firProblems/dataObject.kt rename to compiler/testData/ir/irText/classes/dataClasses/dataObject.kt index 0784d01d1e7..fc56b52a7a3 100644 --- a/compiler/testData/ir/irText/firProblems/dataObject.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // LANGUAGE: +DataObjects data object DataObject diff --git a/compiler/testData/ir/irText/firProblems/dataObject.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/dataObject.kt.txt rename to compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt diff --git a/compiler/testData/ir/irText/firProblems/dataObject.sig.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataObject.sig.kt.txt similarity index 100% rename from compiler/testData/ir/irText/firProblems/dataObject.sig.kt.txt rename to compiler/testData/ir/irText/classes/dataClasses/dataObject.sig.kt.txt diff --git a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.ir.txt index 645f5b27e46..c99634f168c 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.ir.txt @@ -82,6 +82,27 @@ FILE fqName: fileName:/delegationInSealed.kt RETURN type=kotlin.Nothing from='public final fun copy (c: kotlin.CharSequence): .A.B declared in .A.B' CONSTRUCTOR_CALL 'public constructor (c: kotlin.CharSequence) declared in .A.B' type=.A.B origin=null c: GET_VAR 'c: kotlin.CharSequence declared in .A.B.copy' type=kotlin.CharSequence origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A.B) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A.B' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="B(" + CONST String type=kotlin.String value="c=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null + receiver: GET_VAR ': .A.B declared in .A.B.toString' type=.A.B origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A.B) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A.B' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null + receiver: GET_VAR ': .A.B declared in .A.B.hashCode' type=.A.B origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.A.B, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -116,27 +137,6 @@ FILE fqName: fileName:/delegationInSealed.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A.B' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A.B) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A.B' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null - receiver: GET_VAR ': .A.B declared in .A.B.hashCode' type=.A.B origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A.B) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A.B' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="B(" - CONST String type=kotlin.String value="c=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null - receiver: GET_VAR ': .A.B declared in .A.B.toString' type=.A.B origin=null - CONST String type=kotlin.String value=")" FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:kotlin.CharSequence, index:kotlin.Int) returnType:kotlin.Char [fake_override,operator] overridden: public abstract fun get (index: kotlin.Int): kotlin.Char declared in kotlin.CharSequence diff --git a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt index b71930cca5e..ccac63b485b 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt @@ -37,6 +37,14 @@ sealed class A : CharSequence { return B(c = c) } + override fun toString(): String { + return "B(" + "c=" + .#c + ")" + } + + override fun hashCode(): Int { + return .#c.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -51,14 +59,7 @@ sealed class A : CharSequence { return true } - override fun hashCode(): Int { - return .#c.hashCode() - } - - override fun toString(): String { - return "B(" + "c=" + .#c + ")" - } - } } + diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.ir.txt deleted file mode 100644 index 3636c3614f8..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.ir.txt +++ /dev/null @@ -1,174 +0,0 @@ -FILE fqName: fileName:/kt31649.kt - CLASS CLASS name:TestData modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestData - CONSTRUCTOR visibility:public <> (nn:kotlin.Nothing?) returnType:.TestData [primary] - VALUE_PARAMETER name:nn index:0 type:kotlin.Nothing? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestData modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:nn visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'nn: kotlin.Nothing? declared in .TestData.' type=kotlin.Nothing? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestData) returnType:kotlin.Nothing? - correspondingProperty: PROPERTY name:nn visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.TestData - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Nothing? declared in .TestData' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.' type=.TestData origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.TestData) returnType:kotlin.Nothing? [operator] - $this: VALUE_PARAMETER name: type:.TestData - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Nothing? declared in .TestData' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.component1' type=.TestData origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.TestData, nn:kotlin.Nothing?) returnType:.TestData - $this: VALUE_PARAMETER name: type:.TestData - VALUE_PARAMETER name:nn index:0 type:kotlin.Nothing? - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.copy' type=.TestData origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (nn: kotlin.Nothing?): .TestData declared in .TestData' - CONSTRUCTOR_CALL 'public constructor (nn: kotlin.Nothing?) declared in .TestData' type=.TestData origin=null - nn: GET_VAR 'nn: kotlin.Nothing? declared in .TestData.copy' type=kotlin.Nothing? origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.TestData, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestData - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .TestData declared in .TestData.equals' type=.TestData origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .TestData.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestData' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.TestData - GET_VAR 'other: kotlin.Any? declared in .TestData.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestData' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.TestData [val] - TYPE_OP type=.TestData origin=CAST typeOperand=.TestData - GET_VAR 'other: kotlin.Any? declared in .TestData.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.equals' type=.TestData origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR 'val tmp_0: .TestData declared in .TestData.equals' type=.TestData origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestData' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestData' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.TestData) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestData - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .TestData' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.hashCode' type=.TestData origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.hashCode' type=.TestData origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.TestData) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestData - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .TestData' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="TestData(" - CONST String type=kotlin.String value="nn=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestData declared in .TestData.toString' type=.TestData origin=null - CONST String type=kotlin.String value=")" - CLASS CLASS name:TestInline modality:FINAL visibility:public [value] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInline - CONSTRUCTOR visibility:public <> (nn:kotlin.Nothing?) returnType:.TestInline [primary] - VALUE_PARAMETER name:nn index:0 type:kotlin.Nothing? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInline modality:FINAL visibility:public [value] superTypes:[kotlin.Any]' - PROPERTY name:nn visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'nn: kotlin.Nothing? declared in .TestInline.' type=kotlin.Nothing? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInline) returnType:kotlin.Nothing? - correspondingProperty: PROPERTY name:nn visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.TestInline - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Nothing? declared in .TestInline' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestInline declared in .TestInline.' type=.TestInline origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.TestInline, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestInline - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.TestInline - GET_VAR 'other: kotlin.Any? declared in .TestInline.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestInline' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.TestInline [val] - TYPE_OP type=.TestInline origin=CAST typeOperand=.TestInline - GET_VAR 'other: kotlin.Any? declared in .TestInline.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestInline declared in .TestInline.equals' type=.TestInline origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR 'val tmp_1: .TestInline declared in .TestInline.equals' type=.TestInline origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestInline' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .TestInline' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.TestInline) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestInline - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .TestInline' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestInline declared in .TestInline.hashCode' type=.TestInline origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestInline declared in .TestInline.hashCode' type=.TestInline origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.TestInline) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.TestInline - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .TestInline' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="TestInline(" - CONST String type=kotlin.String value="nn=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null - receiver: GET_VAR ': .TestInline declared in .TestInline.toString' type=.TestInline origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.kt.txt deleted file mode 100644 index 1beea911a4d..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/kt31649.fir.kt.txt +++ /dev/null @@ -1,81 +0,0 @@ -data class TestData { - constructor(nn: Nothing?) /* primary */ { - super/*Any*/() - /* () */ - - } - - val nn: Nothing? - field = nn - get - - operator fun component1(): Nothing? { - return .#nn - } - - fun copy(nn: Nothing? = .#nn): TestData { - return TestData(nn = nn) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is TestData -> return false - } - val tmp0_other_with_cast: TestData = other as TestData - when { - EQEQ(arg0 = .#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#nn, arg1 = null) -> 0 - else -> .#nn.hashCode() - } - } - - override fun toString(): String { - return "TestData(" + "nn=" + .#nn + ")" - } - -} - -value class TestInline { - constructor(nn: Nothing?) /* primary */ { - super/*Any*/() - /* () */ - - } - - val nn: Nothing? - field = nn - get - - override operator fun equals(other: Any?): Boolean { - when { - other !is TestInline -> return false - } - val tmp0_other_with_cast: TestInline = other as TestInline - when { - EQEQ(arg0 = .#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#nn, arg1 = null) -> 0 - else -> .#nn.hashCode() - } - } - - override fun toString(): String { - return "TestInline(" + "nn=" + .#nn + ")" - } - -} - diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt b/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt index 4177705fbd6..d46913f9427 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL data class TestData(val nn: Nothing?) inline class TestInline(val nn: Nothing?) \ No newline at end of file diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt49936.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/kt49936.fir.ir.txt deleted file mode 100644 index f0bc0d8ee86..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/kt49936.fir.ir.txt +++ /dev/null @@ -1,98 +0,0 @@ -FILE fqName: fileName:/kt49936.kt - CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.A [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .A.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.' type=.A origin=null - PROPERTY name:x visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL <> ($this:.A, $receiver:kotlin.String) returnType:kotlin.String - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.A - $receiver: VALUE_PARAMETER name: type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .A' - GET_VAR ': kotlin.String declared in .A.' type=kotlin.String origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.Int [operator] - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.component1' type=.A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.A, x:kotlin.Int) returnType:.A - $this: VALUE_PARAMETER name: type:.A - VALUE_PARAMETER name:x index:0 type:kotlin.Int - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.copy' type=.A origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Int): .A declared in .A' - CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int) declared in .A' type=.A origin=null - x: GET_VAR 'x: kotlin.Int declared in .A.copy' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.A, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .A declared in .A.equals' type=.A origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .A.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.A - GET_VAR 'other: kotlin.Any? declared in .A.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] - TYPE_OP type=.A origin=CAST typeOperand=.A - GET_VAR 'other: kotlin.Any? declared in .A.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.equals' type=.A origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR 'val tmp_0: .A declared in .A.equals' type=.A origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="A(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt49936.kt b/compiler/testData/ir/irText/classes/dataClasses/kt49936.kt index 47b7ff19a8c..80444960f28 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/kt49936.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/kt49936.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_KT_DUMP data class A(val x: Int) { val String.x: String get() = this diff --git a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.ir.txt index 5a7cc862a0e..a02b7192747 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.ir.txt @@ -41,6 +41,27 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt RETURN type=kotlin.Nothing from='public final fun copy (runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>): .A declared in .A' CONSTRUCTOR_CALL 'public constructor (runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit>) declared in .A' type=.A origin=null runA: GET_VAR 'runA: @[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.copy' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="A(" + CONST String type=kotlin.String value="runA=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null + receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Function2' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null + receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.A, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -75,27 +96,6 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Function2' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null - receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="A(" - CONST String type=kotlin.String value="runA=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null - receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null - CONST String type=kotlin.String value=")" CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B CONSTRUCTOR visibility:public <> (x:kotlin.Any) returnType:.B [primary] @@ -152,6 +152,27 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Any): .B declared in .B' CONSTRUCTOR_CALL 'public constructor (x: kotlin.Any) declared in .B' type=.B origin=null x: GET_VAR 'x: kotlin.Any declared in .B.copy' type=kotlin.Any origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .B' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="B(" + CONST String type=kotlin.String value="x=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null + receiver: GET_VAR ': .B declared in .B.toString' type=.B origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .B' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null + receiver: GET_VAR ': .B declared in .B.hashCode' type=.B origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.B, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -186,24 +207,3 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .B' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .B' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .B declared in .B.hashCode' type=.B origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .B' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="B(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null - receiver: GET_VAR ': .B declared in .B.toString' type=.B origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt index 1bb66365867..168e6397cee 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt @@ -20,6 +20,14 @@ data class A { return A(runA = runA) } + override fun toString(): String { + return "A(" + "runA=" + .#runA + ")" + } + + override fun hashCode(): Int { + return .#runA.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -34,14 +42,6 @@ data class A { return true } - override fun hashCode(): Int { - return .#runA.hashCode() - } - - override fun toString(): String { - return "A(" + "runA=" + .#runA + ")" - } - } data class B { @@ -74,6 +74,14 @@ data class B { return B(x = x) } + override fun toString(): String { + return "B(" + "x=" + .#x + ")" + } + + override fun hashCode(): Int { + return .#x.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -88,12 +96,5 @@ data class B { return true } - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "B(" + "x=" + .#x + ")" - } - } + diff --git a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.ir.txt b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.ir.txt deleted file mode 100644 index a4ab0ef5605..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.ir.txt +++ /dev/null @@ -1,139 +0,0 @@ -FILE fqName: fileName:/openDataClass.kt - CLASS CLASS name:ValidatedProperties modality:OPEN visibility:public [data] superTypes:[kotlin.Any] - annotations: - Suppress(names = ['INCOMPATIBLE_MODIFIERS']) - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.ValidatedProperties - CONSTRUCTOR visibility:public <> (test1:kotlin.String, test2:kotlin.String) returnType:.ValidatedProperties [primary] - VALUE_PARAMETER name:test1 index:0 type:kotlin.String - VALUE_PARAMETER name:test2 index:1 type:kotlin.String - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ValidatedProperties modality:OPEN visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:test1 visibility:public modality:OPEN [val] - FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:private [final] - EXPRESSION_BODY - GET_VAR 'test1: kotlin.String declared in .ValidatedProperties.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:.ValidatedProperties) returnType:kotlin.String - correspondingProperty: PROPERTY name:test1 visibility:public modality:OPEN [val] - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .ValidatedProperties' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.' type=.ValidatedProperties origin=null - PROPERTY name:test2 visibility:public modality:OPEN [val] - FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:private [final] - EXPRESSION_BODY - GET_VAR 'test2: kotlin.String declared in .ValidatedProperties.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:.ValidatedProperties) returnType:kotlin.String - correspondingProperty: PROPERTY name:test2 visibility:public modality:OPEN [val] - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .ValidatedProperties' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.' type=.ValidatedProperties origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.ValidatedProperties) returnType:kotlin.String [operator] - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.String declared in .ValidatedProperties' - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.component1' type=.ValidatedProperties origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:.ValidatedProperties) returnType:kotlin.String [operator] - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in .ValidatedProperties' - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.component2' type=.ValidatedProperties origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.ValidatedProperties, test1:kotlin.String, test2:kotlin.String) returnType:.ValidatedProperties - $this: VALUE_PARAMETER name: type:.ValidatedProperties - VALUE_PARAMETER name:test1 index:0 type:kotlin.String - EXPRESSION_BODY - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.copy' type=.ValidatedProperties origin=null - VALUE_PARAMETER name:test2 index:1 type:kotlin.String - EXPRESSION_BODY - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.copy' type=.ValidatedProperties origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (test1: kotlin.String, test2: kotlin.String): .ValidatedProperties declared in .ValidatedProperties' - CONSTRUCTOR_CALL 'public constructor (test1: kotlin.String, test2: kotlin.String) declared in .ValidatedProperties' type=.ValidatedProperties origin=null - test1: GET_VAR 'test1: kotlin.String declared in .ValidatedProperties.copy' type=kotlin.String origin=null - test2: GET_VAR 'test2: kotlin.String declared in .ValidatedProperties.copy' type=kotlin.String origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.ValidatedProperties, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.ValidatedProperties - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.equals' type=.ValidatedProperties origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .ValidatedProperties.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ValidatedProperties' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.ValidatedProperties - GET_VAR 'other: kotlin.Any? declared in .ValidatedProperties.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ValidatedProperties' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.ValidatedProperties [val] - TYPE_OP type=.ValidatedProperties origin=CAST typeOperand=.ValidatedProperties - GET_VAR 'other: kotlin.Any? declared in .ValidatedProperties.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.equals' type=.ValidatedProperties origin=null - arg1: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR 'val tmp_0: .ValidatedProperties declared in .ValidatedProperties.equals' type=.ValidatedProperties origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ValidatedProperties' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.equals' type=.ValidatedProperties origin=null - arg1: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR 'val tmp_0: .ValidatedProperties declared in .ValidatedProperties.equals' type=.ValidatedProperties origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ValidatedProperties' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ValidatedProperties' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.ValidatedProperties) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.hashCode' type=.ValidatedProperties origin=null - SET_VAR 'var result: kotlin.Int declared in .ValidatedProperties.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .ValidatedProperties.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.hashCode' type=.ValidatedProperties origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .ValidatedProperties' - GET_VAR 'var result: kotlin.Int declared in .ValidatedProperties.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.ValidatedProperties) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.ValidatedProperties - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .ValidatedProperties' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="ValidatedProperties(" - CONST String type=kotlin.String value="test1=" - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.toString' type=.ValidatedProperties origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="test2=" - CALL 'public open fun (): kotlin.String declared in .ValidatedProperties' type=kotlin.String origin=null - $this: GET_VAR ': .ValidatedProperties declared in .ValidatedProperties.toString' type=.ValidatedProperties origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.kt.txt deleted file mode 100644 index 358e7ebbf4b..00000000000 --- a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.fir.kt.txt +++ /dev/null @@ -1,56 +0,0 @@ -@Suppress(names = ["INCOMPATIBLE_MODIFIERS"]) -open data class ValidatedProperties { - constructor(test1: String, test2: String) /* primary */ { - super/*Any*/() - /* () */ - - } - - open val test1: String - field = test1 - open get - - open val test2: String - field = test2 - open get - - operator fun component1(): String { - return .() - } - - operator fun component2(): String { - return .() - } - - fun copy(test1: String = .(), test2: String = .()): ValidatedProperties { - return ValidatedProperties(test1 = test1, test2 = test2) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is ValidatedProperties -> return false - } - val tmp0_other_with_cast: ValidatedProperties = other as ValidatedProperties - when { - EQEQ(arg0 = .(), arg1 = tmp0_other_with_cast.()).not() -> return false - } - when { - EQEQ(arg0 = .(), arg1 = tmp0_other_with_cast.()).not() -> return false - } - return true - } - - override fun hashCode(): Int { - var result: Int = .().hashCode() - result = result.times(other = 31).plus(other = .().hashCode()) - return result - } - - override fun toString(): String { - return "ValidatedProperties(" + "test1=" + .() + ", " + "test2=" + .() + ")" - } - -} diff --git a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt index 2a062d2dd07..5f14b5af292 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // This test emulates 'allopen' compiler plugin. @Suppress("INCOMPATIBLE_MODIFIERS") diff --git a/compiler/testData/ir/irText/classes/inlineClass.fir.ir.txt b/compiler/testData/ir/irText/classes/inlineClass.fir.ir.txt deleted file mode 100644 index 1228519c787..00000000000 --- a/compiler/testData/ir/irText/classes/inlineClass.fir.ir.txt +++ /dev/null @@ -1,67 +0,0 @@ -FILE fqName: fileName:/inlineClass.kt - CLASS CLASS name:Test modality:FINAL visibility:public [value] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test - CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public [value] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .Test.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test declared in .Test.' type=.Test origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test - GET_VAR 'other: kotlin.Any? declared in .Test.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Test [val] - TYPE_OP type=.Test origin=CAST typeOperand=.Test - GET_VAR 'other: kotlin.Any? declared in .Test.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test declared in .Test.equals' type=.Test origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR 'val tmp_0: .Test declared in .Test.equals' type=.Test origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test declared in .Test.hashCode' type=.Test origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test declared in .Test.toString' type=.Test origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/classes/inlineClass.fir.kt.txt b/compiler/testData/ir/irText/classes/inlineClass.fir.kt.txt deleted file mode 100644 index 5ea9917dc6e..00000000000 --- a/compiler/testData/ir/irText/classes/inlineClass.fir.kt.txt +++ /dev/null @@ -1,32 +0,0 @@ -value class Test { - constructor(x: Int) /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: Int - field = x - get - - override operator fun equals(other: Any?): Boolean { - when { - other !is Test -> return false - } - val tmp0_other_with_cast: Test = other as Test - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "Test(" + "x=" + .#x + ")" - } - -} - diff --git a/compiler/testData/ir/irText/classes/inlineClass.kt b/compiler/testData/ir/irText/classes/inlineClass.kt index 26be59daaa7..adb912ffe70 100644 --- a/compiler/testData/ir/irText/classes/inlineClass.kt +++ b/compiler/testData/ir/irText/classes/inlineClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses inline class Test(val x: Int) diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.ir.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.ir.txt deleted file mode 100644 index 68ddf30c6a4..00000000000 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.ir.txt +++ /dev/null @@ -1,131 +0,0 @@ -FILE fqName: fileName:/inlineClassSyntheticMethods.kt - CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C.C> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (t:T of .C) returnType:.C.C> [primary] - VALUE_PARAMETER name:t index:0 type:T of .C - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:t visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:t type:T of .C visibility:private [final] - EXPRESSION_BODY - GET_VAR 't: T of .C declared in .C.' type=T of .C origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C.C>) returnType:T of .C - correspondingProperty: PROPERTY name:t visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.C.C> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .C declared in .C' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:t type:T of .C visibility:private [final]' type=T of .C origin=null - receiver: GET_VAR ': .C.C> declared in .C.' type=.C.C> origin=null - FUN name:hashCode visibility:public modality:OPEN <> ($this:.C.C>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.C.C> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .C' - TYPE_OP type=kotlin.Int origin=CAST typeOperand=kotlin.Int - CALL 'public final fun (): T of .C declared in .C' type=T of .C origin=GET_PROPERTY - $this: GET_VAR ': .C.C> declared in .C.hashCode' type=.C.C> 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: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 CLASS name:IC modality:FINAL visibility:public [value] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IC.IC> - TYPE_PARAMETER name:TT index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (c:.C.IC>) returnType:.IC.IC> [primary] - VALUE_PARAMETER name:c index:0 type:.C.IC> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:IC modality:FINAL visibility:public [value] superTypes:[kotlin.Any]' - PROPERTY name:c visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final] - EXPRESSION_BODY - GET_VAR 'c: .C.IC> declared in .IC.' type=.C.IC> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.IC.IC>) returnType:.C.IC> - correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.IC.IC> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): .C.IC> declared in .IC' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final]' type=.C.IC> origin=null - receiver: GET_VAR ': .IC.IC> declared in .IC.' type=.IC.IC> origin=null - FUN name:foo visibility:public modality:FINAL <> ($this:.IC.IC>) returnType:kotlin.Int - $this: VALUE_PARAMETER name: type:.IC.IC> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Int declared in .IC' - CALL 'public open fun hashCode (): kotlin.Int declared in .C' type=kotlin.Int origin=null - $this: CALL 'public final fun (): .C.IC> declared in .IC' type=.C.IC> origin=GET_PROPERTY - $this: GET_VAR ': .IC.IC> declared in .IC.foo' type=.IC.IC> origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.IC.IC>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.IC.IC> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.IC.IC> - GET_VAR 'other: kotlin.Any? declared in .IC.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .IC' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.IC.IC> [val] - TYPE_OP type=.IC.IC> origin=CAST typeOperand=.IC.IC> - GET_VAR 'other: kotlin.Any? declared in .IC.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final]' type=.C.IC> origin=null - receiver: GET_VAR ': .IC.IC> declared in .IC.equals' type=.IC.IC> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final]' type=.C.IC> origin=null - receiver: GET_VAR 'val tmp_0: .IC.IC> declared in .IC.equals' type=.IC.IC> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .IC' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .IC' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.IC.IC>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.IC.IC> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .IC' - CALL 'public open fun hashCode (): kotlin.Int declared in .C' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final]' type=.C.IC> origin=null - receiver: GET_VAR ': .IC.IC> declared in .IC.hashCode' type=.IC.IC> origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.IC.IC>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.IC.IC> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .IC' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="IC(" - CONST String type=kotlin.String value="c=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:.C.IC> visibility:private [final]' type=.C.IC> origin=null - receiver: GET_VAR ': .IC.IC> declared in .IC.toString' type=.IC.IC> origin=null - CONST String type=kotlin.String value=")" - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - VAR name:ic type:.IC [val] - CONSTRUCTOR_CALL 'public constructor (c: .C.IC>) declared in .IC' type=.IC origin=null - : kotlin.Int - c: CONSTRUCTOR_CALL 'public constructor (t: T of .C) declared in .C' type=.C origin=null - : kotlin.Int - t: CONST Int type=kotlin.Int value=42 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun foo (): kotlin.Int declared in .IC' type=kotlin.Int origin=null - $this: GET_VAR 'val ic: .IC declared in .box' type=.IC origin=null - arg1: CONST Int type=kotlin.Int value=42 - then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CONST String type=kotlin.String value="FAIL" - RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.kt.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.kt.txt deleted file mode 100644 index 14a3c0cbfd3..00000000000 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.kt.txt +++ /dev/null @@ -1,61 +0,0 @@ -class C { - constructor(t: T) /* primary */ { - super/*Any*/() - /* () */ - - } - - val t: T - field = t - get - - override fun hashCode(): Int { - return .() as Int - } - -} - -value class IC { - constructor(c: C) /* primary */ { - super/*Any*/() - /* () */ - - } - - val c: C - field = c - get - - fun foo(): Int { - return .().hashCode() - } - - override operator fun equals(other: Any?): Boolean { - when { - other !is IC -> return false - } - val tmp0_other_with_cast: IC = other as IC - when { - EQEQ(arg0 = .#c, arg1 = tmp0_other_with_cast.#c).not() -> return false - } - return true - } - - override fun hashCode(): Int { - return .#c.hashCode() - } - - override fun toString(): String { - return "IC(" + "c=" + .#c + ")" - } - -} - -fun box(): String { - val ic: IC = IC(c = C(t = 42)) - when { - EQEQ(arg0 = ic.foo(), arg1 = 42).not() -> return "FAIL" - } - return "OK" -} - diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt index 2df1de559e0..c98ae788c29 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +InlineClasses class C(val t: T) { diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt index 7df3949ece2..344d9c8bae1 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt @@ -41,6 +41,27 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): .MyContainer declared in .MyContainer' CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .MyContainer' type=.MyContainer origin=null i: GET_VAR 'i: kotlin.Int declared in .MyContainer.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyContainer + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyContainer' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="MyContainer(" + CONST String type=kotlin.String value="i=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .MyContainer declared in .MyContainer.toString' type=.MyContainer origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyContainer + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyContainer' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .MyContainer declared in .MyContainer.hashCode' type=.MyContainer origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -75,27 +96,6 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyContainer' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyContainer - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyContainer' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .MyContainer declared in .MyContainer.hashCode' type=.MyContainer origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyContainer - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyContainer' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="MyContainer(" - CONST String type=kotlin.String value="i=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .MyContainer declared in .MyContainer.toString' type=.MyContainer origin=null - CONST String type=kotlin.String value=")" PROPERTY name:operationScore visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt index d2dab0f9bd6..7f413b695a8 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt @@ -18,6 +18,14 @@ data class MyContainer { return MyContainer(i = i) } + override fun toString(): String { + return "MyContainer(" + "i=" + .#i + ")" + } + + override fun hashCode(): Int { + return .#i.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,14 +40,6 @@ data class MyContainer { return true } - override fun hashCode(): Int { - return .#i.hashCode() - } - - override fun toString(): String { - return "MyContainer(" + "i=" + .#i + ")" - } - } var operationScore: Int @@ -83,3 +83,4 @@ fun box(): String { else -> "fail" } } + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt index 08694f404f5..d690a327dff 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.ir.txt @@ -41,6 +41,27 @@ FILE fqName: fileName:/arrayAccessOperators.kt RETURN type=kotlin.Nothing from='public final fun copy (s: kotlin.String): .MyContainer declared in .MyContainer' CONSTRUCTOR_CALL 'public constructor (s: kotlin.String) declared in .MyContainer' type=.MyContainer origin=null s: GET_VAR 's: kotlin.String declared in .MyContainer.copy' type=kotlin.String origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyContainer + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyContainer' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="MyContainer(" + CONST String type=kotlin.String value="s=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null + receiver: GET_VAR ': .MyContainer declared in .MyContainer.toString' type=.MyContainer origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyContainer + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyContainer' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null + receiver: GET_VAR ': .MyContainer declared in .MyContainer.hashCode' type=.MyContainer origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -75,27 +96,6 @@ FILE fqName: fileName:/arrayAccessOperators.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyContainer' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyContainer - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyContainer' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null - receiver: GET_VAR ': .MyContainer declared in .MyContainer.hashCode' type=.MyContainer origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyContainer) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyContainer - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyContainer' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="MyContainer(" - CONST String type=kotlin.String value="s=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null - receiver: GET_VAR ': .MyContainer declared in .MyContainer.toString' type=.MyContainer origin=null - CONST String type=kotlin.String value=")" FUN name:get visibility:public modality:FINAL <> ($receiver:.MyContainer, $context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.String? [operator] contextReceiverParametersCount: 1 $receiver: VALUE_PARAMETER name: type:.MyContainer diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt index ccb3d5d0ae1..0fa93b8ece3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt @@ -18,6 +18,14 @@ data class MyContainer { return MyContainer(s = s) } + override fun toString(): String { + return "MyContainer(" + "s=" + .#s + ")" + } + + override fun hashCode(): Int { + return .#s.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,14 +40,6 @@ data class MyContainer { return true } - override fun hashCode(): Int { - return .#s.hashCode() - } - - override fun toString(): String { - return "MyContainer(" + "s=" + .#s + ")" - } - } operator fun MyContainer.get($context_receiver_0: Int, index: Int): String? { @@ -76,3 +76,4 @@ fun box(): String { } ) } + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt index 0694191a7b1..e71366a7211 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt @@ -41,6 +41,27 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): .Result declared in .Result' CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null i: GET_VAR 'i: kotlin.Int declared in .Result.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Result + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Result' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Result(" + CONST String type=kotlin.String value="i=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .Result declared in .Result.toString' type=.Result origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Result + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Result' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .Result declared in .Result.hashCode' type=.Result origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -75,27 +96,6 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Result' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Result - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Result' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .Result declared in .Result.hashCode' type=.Result origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Result - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Result' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Result(" - CONST String type=kotlin.String value="i=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .Result declared in .Result.toString' type=.Result origin=null - CONST String type=kotlin.String value=")" PROPERTY name:operationScore visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt index 738f6edbfcb..ee182dcf0cf 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt @@ -18,6 +18,14 @@ data class Result { return Result(i = i) } + override fun toString(): String { + return "Result(" + "i=" + .#i + ")" + } + + override fun hashCode(): Int { + return .#i.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,14 +40,6 @@ data class Result { return true } - override fun hashCode(): Int { - return .#i.hashCode() - } - - override fun toString(): String { - return "Result(" + "i=" + .#i + ")" - } - } var operationScore: Int @@ -104,3 +104,4 @@ fun box(): String { else -> "fail" } } + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.ir.txt index 232582b98ed..b1728cf9e9f 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.ir.txt @@ -60,6 +60,59 @@ FILE fqName: fileName:/compareTo.kt : B of .Pair first: GET_VAR 'first: A of .Pair declared in .Pair.copy' type=A of .Pair origin=null second: GET_VAR 'second: B of .Pair declared in .Pair.copy' type=B of .Pair origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Pair.Pair, B of .Pair>) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Pair.Pair, B of .Pair> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Pair' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Pair(" + CONST String type=kotlin.String value="first=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.toString' type=.Pair.Pair, B of .Pair> origin=null + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="second=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.toString' type=.Pair.Pair, B of .Pair> origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Pair.Pair, B of .Pair>) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Pair.Pair, B of .Pair> + BLOCK_BODY + VAR name:result type:kotlin.Int [var] + 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null + SET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Unit origin=EQ + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=31 + other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null + receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Pair' + GET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Int origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Pair.Pair, B of .Pair>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -104,59 +157,6 @@ FILE fqName: fileName:/compareTo.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Pair' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Pair.Pair, B of .Pair>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Pair.Pair, B of .Pair> - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null - SET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.hashCode' type=.Pair.Pair, B of .Pair> origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Pair' - GET_VAR 'var result: kotlin.Int declared in .Pair.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Pair.Pair, B of .Pair>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Pair.Pair, B of .Pair> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Pair' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Pair(" - CONST String type=kotlin.String value="first=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of .Pair visibility:private [final]' type=A of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.toString' type=.Pair.Pair, B of .Pair> origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="second=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of .Pair visibility:private [final]' type=B of .Pair origin=null - receiver: GET_VAR ': .Pair.Pair, B of .Pair> declared in .Pair.toString' type=.Pair.Pair, B of .Pair> origin=null - CONST String type=kotlin.String value=")" FUN name:compareTo visibility:public modality:FINAL ($receiver:T of .compareTo, $context_receiver_0:java.util.Comparator.compareTo>, other:T of .compareTo) returnType:kotlin.Int [operator,infix] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false contextReceiverParametersCount: 1 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt index 44c08706868..69ff6ac43ea 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt @@ -25,6 +25,22 @@ data class Pair { return Pair(first = first, second = second) } + override fun toString(): String { + return "Pair(" + "first=" + .#first + ", " + "second=" + .#second + ")" + } + + override fun hashCode(): Int { + var result: Int = when { + EQEQ(arg0 = .#first, arg1 = null) -> 0 + else -> .#first.hashCode() + } + result = result.times(other = 31).plus(other = when { + EQEQ(arg0 = .#second, arg1 = null) -> 0 + else -> .#second.hashCode() + }) + return result + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -42,22 +58,6 @@ data class Pair { return true } - override fun hashCode(): Int { - var result: Int = when { - EQEQ(arg0 = .#first, arg1 = null) -> 0 - else -> .#first.hashCode() - } - result = result.times(other = 31).plus(other = when { - EQEQ(arg0 = .#second, arg1 = null) -> 0 - else -> .#second.hashCode() - }) - return result - } - - override fun toString(): String { - return "Pair(" + "first=" + .#first + ", " + "second=" + .#second + ")" - } - } infix operator fun T.compareTo($context_receiver_0: Comparator, other: T): Int { @@ -88,3 +88,4 @@ fun box(): String { } ) } + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt index a6bb58c8166..5017a3d580f 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt @@ -43,6 +43,27 @@ FILE fqName: fileName:/iteratorOperator.kt RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): .Counter declared in .Counter' CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Counter' type=.Counter origin=null i: GET_VAR 'i: kotlin.Int declared in .Counter.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Counter) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Counter + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Counter' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Counter(" + CONST String type=kotlin.String value="i=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .Counter declared in .Counter.toString' type=.Counter origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Counter) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Counter + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Counter' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null + receiver: GET_VAR ': .Counter declared in .Counter.hashCode' type=.Counter origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Counter, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -77,27 +98,6 @@ FILE fqName: fileName:/iteratorOperator.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Counter' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Counter) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Counter - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Counter' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .Counter declared in .Counter.hashCode' type=.Counter origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Counter) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Counter - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Counter' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Counter(" - CONST String type=kotlin.String value="i=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .Counter declared in .Counter.toString' type=.Counter origin=null - CONST String type=kotlin.String value=")" CLASS CLASS name:CounterConfig modality:FINAL visibility:public [data] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.CounterConfig CONSTRUCTOR visibility:public <> (max:kotlin.Int) returnType:.CounterConfig [primary] @@ -134,6 +134,27 @@ FILE fqName: fileName:/iteratorOperator.kt RETURN type=kotlin.Nothing from='public final fun copy (max: kotlin.Int): .CounterConfig declared in .CounterConfig' CONSTRUCTOR_CALL 'public constructor (max: kotlin.Int) declared in .CounterConfig' type=.CounterConfig origin=null max: GET_VAR 'max: kotlin.Int declared in .CounterConfig.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.CounterConfig) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.CounterConfig + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .CounterConfig' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="CounterConfig(" + CONST String type=kotlin.String value="max=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .CounterConfig declared in .CounterConfig.toString' type=.CounterConfig origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.CounterConfig) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.CounterConfig + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .CounterConfig' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .CounterConfig declared in .CounterConfig.hashCode' type=.CounterConfig origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.CounterConfig, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -168,27 +189,6 @@ FILE fqName: fileName:/iteratorOperator.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .CounterConfig' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.CounterConfig) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.CounterConfig - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .CounterConfig' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .CounterConfig declared in .CounterConfig.hashCode' type=.CounterConfig origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.CounterConfig) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.CounterConfig - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .CounterConfig' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="CounterConfig(" - CONST String type=kotlin.String value="max=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .CounterConfig declared in .CounterConfig.toString' type=.CounterConfig origin=null - CONST String type=kotlin.String value=")" CLASS CLASS name:CounterIterator modality:FINAL visibility:public superTypes:[kotlin.collections.Iterator] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.CounterIterator FIELD FIELD_FOR_CLASS_CONTEXT_RECEIVER name:contextReceiverField0 type:.CounterConfig visibility:private [final] diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt index 53115ad5e19..5f556d19afc 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt @@ -18,6 +18,14 @@ data class Counter { return Counter(i = i) } + override fun toString(): String { + return "Counter(" + "i=" + .#i + ")" + } + + override fun hashCode(): Int { + return .#i.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,14 +40,6 @@ data class Counter { return true } - override fun hashCode(): Int { - return .#i.hashCode() - } - - override fun toString(): String { - return "Counter(" + "i=" + .#i + ")" - } - } data class CounterConfig { @@ -61,6 +61,14 @@ data class CounterConfig { return CounterConfig(max = max) } + override fun toString(): String { + return "CounterConfig(" + "max=" + .#max + ")" + } + + override fun hashCode(): Int { + return .#max.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -75,14 +83,6 @@ data class CounterConfig { return true } - override fun hashCode(): Int { - return .#max.hashCode() - } - - override fun toString(): String { - return "CounterConfig(" + "max=" + .#max + ")" - } - } class CounterIterator : Iterator { @@ -139,3 +139,4 @@ fun box(): String { else -> "fail" } } + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt index b2e4ca1b45c..06906f6f31d 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt @@ -33,6 +33,27 @@ FILE fqName: fileName:/unaryOperators.kt RETURN type=kotlin.Nothing from='public final fun copy (i: kotlin.Int): .Result declared in .Result' CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null i: GET_VAR 'i: kotlin.Int declared in .Result.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Result + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Result' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Result(" + CONST String type=kotlin.String value="i=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .Result declared in .Result.toString' type=.Result origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Result + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Result' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .Result declared in .Result.hashCode' type=.Result origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Result, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -67,27 +88,6 @@ FILE fqName: fileName:/unaryOperators.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Result' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Result - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Result' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Result declared in .Result.hashCode' type=.Result origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Result) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Result - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Result' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Result(" - CONST String type=kotlin.String value="i=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Result declared in .Result.toString' type=.Result origin=null - CONST String type=kotlin.String value=")" PROPERTY name:operationScore visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt index c027a03c527..a7d9cf4d38f 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt @@ -17,6 +17,14 @@ data class Result { return Result(i = i) } + override fun toString(): String { + return "Result(" + "i=" + .#i + ")" + } + + override fun hashCode(): Int { + return .#i.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -31,14 +39,6 @@ data class Result { return true } - override fun hashCode(): Int { - return .#i.hashCode() - } - - override fun toString(): String { - return "Result(" + "i=" + .#i + ")" - } - } var operationScore: Int @@ -99,3 +99,4 @@ fun box(): String { else -> "fail" } } + diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.ir.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.ir.txt index f10e30cbe6b..4c2f30811de 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.ir.txt @@ -17,6 +17,27 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .IT' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .IT declared in .IT.' type=.IT origin=null + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.IT) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.IT + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .IT' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="IT(" + CONST String type=kotlin.String value="x=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .IT declared in .IT.toString' type=.IT origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.IT) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.IT + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .IT' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .IT declared in .IT.hashCode' type=.IT origin=null FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.IT, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -44,27 +65,6 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .IT' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.IT) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.IT - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .IT' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .IT declared in .IT.hashCode' type=.IT origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.IT) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.IT - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .IT' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="IT(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .IT declared in .IT.toString' type=.IT origin=null - CONST String type=kotlin.String value=")" CLASS CLASS name:InlineMutableSet modality:FINAL visibility:public [value] superTypes:[kotlin.collections.MutableSet<.IT>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.InlineMutableSet CONSTRUCTOR visibility:public <> (ms:kotlin.collections.MutableSet<.IT>) returnType:.InlineMutableSet [primary] @@ -199,6 +199,27 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt $this: CALL 'private final fun (): kotlin.collections.MutableSet<.IT> declared in .InlineMutableSet' type=kotlin.collections.MutableSet<.IT> origin=GET_PROPERTY $this: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.retainAll' type=.InlineMutableSet origin=null elements: GET_VAR 'elements: kotlin.collections.Collection<.IT> declared in .InlineMutableSet.retainAll' type=kotlin.collections.Collection<.IT> origin=null + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.InlineMutableSet) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.InlineMutableSet + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .InlineMutableSet' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="InlineMutableSet(" + CONST String type=kotlin.String value="ms=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<.IT> visibility:private [final]' type=kotlin.collections.MutableSet<.IT> origin=null + receiver: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.toString' type=.InlineMutableSet origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.InlineMutableSet) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.InlineMutableSet + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .InlineMutableSet' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.MutableSet' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<.IT> visibility:private [final]' type=kotlin.collections.MutableSet<.IT> origin=null + receiver: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.hashCode' type=.InlineMutableSet origin=null FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.InlineMutableSet, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -226,24 +247,3 @@ FILE fqName: fileName:/inlineCollectionOfInlineClass.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .InlineMutableSet' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.InlineMutableSet) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.InlineMutableSet - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .InlineMutableSet' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.collections.MutableSet' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<.IT> visibility:private [final]' type=kotlin.collections.MutableSet<.IT> origin=null - receiver: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.hashCode' type=.InlineMutableSet origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.InlineMutableSet) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.InlineMutableSet - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .InlineMutableSet' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="InlineMutableSet(" - CONST String type=kotlin.String value="ms=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<.IT> visibility:private [final]' type=kotlin.collections.MutableSet<.IT> origin=null - receiver: GET_VAR ': .InlineMutableSet declared in .InlineMutableSet.toString' type=.InlineMutableSet origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt index 61b5229423a..fc336bd34fe 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt @@ -9,6 +9,14 @@ value class IT { field = x get + override fun toString(): String { + return "IT(" + "x=" + .#x + ")" + } + + override fun hashCode(): Int { + return .#x.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { other !is IT -> return false @@ -20,14 +28,6 @@ value class IT { return true } - override fun hashCode(): Int { - return .#x.hashCode() - } - - override fun toString(): String { - return "IT(" + "x=" + .#x + ")" - } - } value class InlineMutableSet : MutableSet { @@ -86,6 +86,14 @@ value class InlineMutableSet : MutableSet { return .().retainAll(elements = elements) } + override fun toString(): String { + return "InlineMutableSet(" + "ms=" + .#ms + ")" + } + + override fun hashCode(): Int { + return .#ms.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { other !is InlineMutableSet -> return false @@ -97,13 +105,5 @@ value class InlineMutableSet : MutableSet { return true } - override fun hashCode(): Int { - return .#ms.hashCode() - } - - override fun toString(): String { - return "InlineMutableSet(" + "ms=" + .#ms + ")" - } - } diff --git a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.ir.txt b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.ir.txt index aff1d824f90..7de3701e048 100644 --- a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.ir.txt @@ -35,6 +35,27 @@ FILE fqName: fileName:/dataClassWithJvmRecord.kt RETURN type=kotlin.Nothing from='public final fun copy (name: kotlin.String): .MyRec declared in .MyRec' CONSTRUCTOR_CALL 'public constructor (name: kotlin.String) declared in .MyRec' type=.MyRec origin=null name: GET_VAR 'name: kotlin.String declared in .MyRec.copy' type=kotlin.String origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyRec) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyRec + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyRec' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="MyRec(" + CONST String type=kotlin.String value="name=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .MyRec declared in .MyRec.toString' type=.MyRec origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyRec) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.MyRec + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyRec' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .MyRec declared in .MyRec.hashCode' type=.MyRec origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.MyRec, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -69,27 +90,6 @@ FILE fqName: fileName:/dataClassWithJvmRecord.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .MyRec' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.MyRec) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyRec - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .MyRec' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .MyRec declared in .MyRec.hashCode' type=.MyRec origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.MyRec) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.MyRec - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .MyRec' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="MyRec(" - CONST String type=kotlin.String value="name=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .MyRec declared in .MyRec.toString' type=.MyRec origin=null - CONST String type=kotlin.String value=")" FUN name:test visibility:public modality:FINAL <> (rec:.MyRec) returnType:kotlin.Unit VALUE_PARAMETER name:rec index:0 type:.MyRec BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt index c90f48366a2..a659c3abc05 100644 --- a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt @@ -18,6 +18,14 @@ data class MyRec : Record { return MyRec(name = name) } + override fun toString(): String { + return "MyRec(" + "name=" + .#name + ")" + } + + override fun hashCode(): Int { + return .#name.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,16 +40,9 @@ data class MyRec : Record { return true } - override fun hashCode(): Int { - return .#name.hashCode() - } - - override fun toString(): String { - return "MyRec(" + "name=" + .#name + ")" - } - } fun test(rec: MyRec) { rec.() /*~> Unit */ } + diff --git a/compiler/testData/ir/irText/declarations/kt52677.fir.ir.txt b/compiler/testData/ir/irText/declarations/kt52677.fir.ir.txt index f28b17f9808..75f6b835d87 100644 --- a/compiler/testData/ir/irText/declarations/kt52677.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/kt52677.fir.ir.txt @@ -67,6 +67,27 @@ FILE fqName: fileName:/kt52677.kt RETURN type=kotlin.Nothing from='public final fun copy (id: @[MySerializable(c = ...)] .Uuid1): .LoginSuccessPacket declared in .LoginSuccessPacket' CONSTRUCTOR_CALL 'public constructor (id: @[MySerializable(c = ...)] .Uuid1) declared in .LoginSuccessPacket' type=.LoginSuccessPacket origin=null id: GET_VAR 'id: @[MySerializable(c = ...)] .Uuid1 declared in .LoginSuccessPacket.copy' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[.MySerializer<@[MySerializable(c = ...)] .Uuid1>]' type=kotlin.reflect.KClass<.UuidSerializer>)] .Uuid1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.LoginSuccessPacket) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.LoginSuccessPacket + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .LoginSuccessPacket' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="LoginSuccessPacket(" + CONST String type=kotlin.String value="id=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] .Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[.MySerializer<@[MySerializable(c = ...)] .Uuid1>]' type=kotlin.reflect.KClass<.UuidSerializer>)] .Uuid1 origin=null + receiver: GET_VAR ': .LoginSuccessPacket declared in .LoginSuccessPacket.toString' type=.LoginSuccessPacket origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.LoginSuccessPacket) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.LoginSuccessPacket + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .LoginSuccessPacket' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] .Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[.MySerializer<@[MySerializable(c = ...)] .Uuid1>]' type=kotlin.reflect.KClass<.UuidSerializer>)] .Uuid1 origin=null + receiver: GET_VAR ': .LoginSuccessPacket declared in .LoginSuccessPacket.hashCode' type=.LoginSuccessPacket origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.LoginSuccessPacket, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -101,27 +122,6 @@ FILE fqName: fileName:/kt52677.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .LoginSuccessPacket' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.LoginSuccessPacket) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.LoginSuccessPacket - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .LoginSuccessPacket' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] .Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[.MySerializer<@[MySerializable(c = ...)] .Uuid1>]' type=kotlin.reflect.KClass<.UuidSerializer>)] .Uuid1 origin=null - receiver: GET_VAR ': .LoginSuccessPacket declared in .LoginSuccessPacket.hashCode' type=.LoginSuccessPacket origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.LoginSuccessPacket) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.LoginSuccessPacket - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .LoginSuccessPacket' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="LoginSuccessPacket(" - CONST String type=kotlin.String value="id=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] .Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[.MySerializer<@[MySerializable(c = ...)] .Uuid1>]' type=kotlin.reflect.KClass<.UuidSerializer>)] .Uuid1 origin=null - receiver: GET_VAR ': .LoginSuccessPacket declared in .LoginSuccessPacket.toString' type=.LoginSuccessPacket origin=null - CONST String type=kotlin.String value=")" CLASS INTERFACE name:MySerializer modality:ABSTRACT visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MySerializer.MySerializer> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt b/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt index 239052f6d31..683de19961d 100644 --- a/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt @@ -32,6 +32,14 @@ data class LoginSuccessPacket { return LoginSuccessPacket(id = id) } + override fun toString(): String { + return "LoginSuccessPacket(" + "id=" + .#id + ")" + } + + override fun hashCode(): Int { + return .#id.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -46,14 +54,6 @@ data class LoginSuccessPacket { return true } - override fun hashCode(): Int { - return .#id.hashCode() - } - - override fun toString(): String { - return "LoginSuccessPacket(" + "id=" + .#id + ")" - } - } interface MySerializer { @@ -85,3 +85,4 @@ fun foo(): @MySerializable(c = UuidSerializer::class) Uuid1 { fun bar(): @MySerializable(c = UuidSerializer::class) Uuid1 { return foo() } + diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.ir.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.ir.txt deleted file mode 100644 index fd502a0a293..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.ir.txt +++ /dev/null @@ -1,150 +0,0 @@ -FILE fqName: fileName:/dataClassMembers.kt - CLASS CLASS name:Test modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.Test> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (x:T of .Test, y:kotlin.String) returnType:.Test.Test> [primary] - VALUE_PARAMETER name:x index:0 type:T of .Test - VALUE_PARAMETER name:y index:1 type:kotlin.String - EXPRESSION_BODY - CONST String type=kotlin.String value="" - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final] - EXPRESSION_BODY - GET_VAR 'x: T of .Test declared in .Test.' type=T of .Test origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test.Test>) returnType:T of .Test - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Test declared in .Test' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.' type=.Test.Test> origin=null - PROPERTY name:y visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final] - EXPRESSION_BODY - GET_VAR 'y: kotlin.String declared in .Test.' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test.Test>) returnType:kotlin.String - correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Test' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.' type=.Test.Test> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.Test.Test>) returnType:T of .Test [operator] - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component1 (): T of .Test declared in .Test' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.component1' type=.Test.Test> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:.Test.Test>) returnType:kotlin.String [operator] - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in .Test' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.component2' type=.Test.Test> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:.Test.Test>, x:T of .Test, y:kotlin.String) returnType:.Test.Test> - $this: VALUE_PARAMETER name: type:.Test.Test> - VALUE_PARAMETER name:x index:0 type:T of .Test - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.copy' type=.Test.Test> origin=null - VALUE_PARAMETER name:y index:1 type:kotlin.String - EXPRESSION_BODY - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.copy' type=.Test.Test> origin=null - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun copy (x: T of .Test, y: kotlin.String): .Test.Test> declared in .Test' - CONSTRUCTOR_CALL 'public constructor (x: T of .Test, y: kotlin.String) declared in .Test' type=.Test.Test> origin=null - : T of .Test - x: GET_VAR 'x: T of .Test declared in .Test.copy' type=T of .Test origin=null - y: GET_VAR 'y: kotlin.String declared in .Test.copy' type=kotlin.String origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test.Test>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test.Test> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .Test.Test> declared in .Test.equals' type=.Test.Test> origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .Test.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.Test.Test> - GET_VAR 'other: kotlin.Any? declared in .Test.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Test.Test> [val] - TYPE_OP type=.Test.Test> origin=CAST typeOperand=.Test.Test> - GET_VAR 'other: kotlin.Any? declared in .Test.equals' type=kotlin.Any? origin=null - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.equals' type=.Test.Test> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR 'val tmp_0: .Test.Test> declared in .Test.equals' type=.Test.Test> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.equals' type=.Test.Test> origin=null - arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR 'val tmp_0: .Test.Test> declared in .Test.equals' type=.Test.Test> origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=false - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Test' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Test.Test>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.hashCode' type=.Test.Test> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.hashCode' type=.Test.Test> origin=null - SET_VAR 'var result: kotlin.Int declared in .Test.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .Test.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.hashCode' type=.Test.Test> origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test' - GET_VAR 'var result: kotlin.Int declared in .Test.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Test.Test>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Test.Test> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Test(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Test visibility:private [final]' type=T of .Test origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.toString' type=.Test.Test> origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="y=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Test.Test> declared in .Test.toString' type=.Test.Test> origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.kt.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.kt.txt deleted file mode 100644 index f436e22b2d5..00000000000 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.kt.txt +++ /dev/null @@ -1,59 +0,0 @@ -data class Test { - constructor(x: T, y: String = "") /* primary */ { - super/*Any*/() - /* () */ - - } - - val x: T - field = x - get - - val y: String - field = y - get - - operator fun component1(): T { - return .#x - } - - operator fun component2(): String { - return .#y - } - - fun copy(x: T = .#x, y: String = .#y): Test { - return Test(x = x, y = y) - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is Test -> return false - } - val tmp0_other_with_cast: Test = other as Test - when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false - } - when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false - } - return true - } - - override fun hashCode(): Int { - var result: Int = when { - EQEQ(arg0 = .#x, arg1 = null) -> 0 - else -> .#x.hashCode() - } - result = result.times(other = 31).plus(other = .#y.hashCode()) - return result - } - - override fun toString(): String { - return "Test(" + "x=" + .#x + ", " + "y=" + .#y + ")" - } - -} - diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt index d3a67690a9a..b5f61643af4 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt @@ -1 +1,2 @@ +// FIR_IDENTICAL data class Test(val x: T, val y: String = "") diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt index 26617c1c52a..6df82b2389f 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt @@ -745,6 +745,50 @@ FILE fqName: fileName:/ArrayMap.kt : T of .ArrayMapImpl.Entry key: GET_VAR 'key: kotlin.Int declared in .ArrayMapImpl.Entry.copy' type=kotlin.Int origin=null value: GET_VAR 'value: T of .ArrayMapImpl.Entry declared in .ArrayMapImpl.Entry.copy' type=T of .ArrayMapImpl.Entry origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.ArrayMapImpl.Entry.ArrayMapImpl.Entry>) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.ArrayMapImpl.Entry.ArrayMapImpl.Entry> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .ArrayMapImpl.Entry' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Entry(" + CONST String type=kotlin.String value="key=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.toString' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="value=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null + receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.toString' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.ArrayMapImpl.Entry.ArrayMapImpl.Entry>) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.ArrayMapImpl.Entry.ArrayMapImpl.Entry> + BLOCK_BODY + VAR name:result type:kotlin.Int [var] + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null + SET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Unit origin=EQ + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=31 + other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null + receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null + receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .ArrayMapImpl.Entry' + GET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Int origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.ArrayMapImpl.Entry.ArrayMapImpl.Entry>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -789,50 +833,6 @@ FILE fqName: fileName:/ArrayMap.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .ArrayMapImpl.Entry' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.ArrayMapImpl.Entry.ArrayMapImpl.Entry>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.ArrayMapImpl.Entry.ArrayMapImpl.Entry> - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null - SET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null - receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null - receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.hashCode' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .ArrayMapImpl.Entry' - GET_VAR 'var result: kotlin.Int declared in .ArrayMapImpl.Entry.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.ArrayMapImpl.Entry.ArrayMapImpl.Entry>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.ArrayMapImpl.Entry.ArrayMapImpl.Entry> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .ArrayMapImpl.Entry' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Entry(" - CONST String type=kotlin.String value="key=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.toString' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="value=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .ArrayMapImpl.Entry visibility:private [final]' type=T of .ArrayMapImpl.Entry origin=null - receiver: GET_VAR ': .ArrayMapImpl.Entry.ArrayMapImpl.Entry> declared in .ArrayMapImpl.Entry.toString' type=.ArrayMapImpl.Entry.ArrayMapImpl.Entry> origin=null - CONST String type=kotlin.String value=")" 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 .ArrayMap diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt index 9dd98ba68f5..429c509dba5 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt @@ -295,6 +295,19 @@ internal class ArrayMapImpl : ArrayMap { return Entry(key = key, value = value) } + override fun toString(): String { + return "Entry(" + "key=" + .#key + ", " + "value=" + .#value + ")" + } + + override fun hashCode(): Int { + var result: Int = .#key.hashCode() + result = result.times(other = 31).plus(other = when { + EQEQ(arg0 = .#value, arg1 = null) -> 0 + else -> .#value.hashCode() + }) + return result + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -312,19 +325,7 @@ internal class ArrayMapImpl : ArrayMap { return true } - override fun hashCode(): Int { - var result: Int = .#key.hashCode() - result = result.times(other = 31).plus(other = when { - EQEQ(arg0 = .#value, arg1 = null) -> 0 - else -> .#value.hashCode() - }) - return result - } - - override fun toString(): String { - return "Entry(" + "key=" + .#key + ", " + "value=" + .#value + ")" - } - } } + diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt index f3ae8b50f3e..95e75a8032c 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt @@ -35,6 +35,36 @@ FILE fqName: fileName:/MultiList.kt CONSTRUCTOR_CALL 'public constructor (value: T of .Some) declared in .Some' type=.Some.Some> origin=null : T of .Some value: GET_VAR 'value: T of .Some declared in .Some.copy' type=T of .Some origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Some.Some>) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Some.Some> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Some' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Some(" + CONST String type=kotlin.String value="value=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null + receiver: GET_VAR ': .Some.Some> declared in .Some.toString' type=.Some.Some> origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Some.Some>) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Some.Some> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Some' + 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null + receiver: GET_VAR ': .Some.Some> declared in .Some.hashCode' type=.Some.Some> origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null + receiver: GET_VAR ': .Some.Some> declared in .Some.hashCode' type=.Some.Some> origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Some.Some>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -69,36 +99,6 @@ FILE fqName: fileName:/MultiList.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Some' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Some.Some>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Some.Some> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Some' - 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null - receiver: GET_VAR ': .Some.Some> declared in .Some.hashCode' type=.Some.Some> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null - receiver: GET_VAR ': .Some.Some> declared in .Some.hashCode' type=.Some.Some> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Some.Some>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Some.Some> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Some' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Some(" - CONST String type=kotlin.String value="value=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .Some visibility:private [final]' type=T of .Some origin=null - receiver: GET_VAR ': .Some.Some> declared in .Some.toString' type=.Some.Some> origin=null - CONST String type=kotlin.String value=")" CLASS INTERFACE name:MyList modality:ABSTRACT visibility:public superTypes:[kotlin.collections.List<.Some.MyList>>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyList.MyList> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt index 576b60d31f5..092fc6ef0a1 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt @@ -17,6 +17,17 @@ data class Some { return Some(value = value) } + override fun toString(): String { + return "Some(" + "value=" + .#value + ")" + } + + override fun hashCode(): Int { + return when { + EQEQ(arg0 = .#value, arg1 = null) -> 0 + else -> .#value.hashCode() + } + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -31,17 +42,6 @@ data class Some { return true } - override fun hashCode(): Int { - return when { - EQEQ(arg0 = .#value, arg1 = null) -> 0 - else -> .#value.hashCode() - } - } - - override fun toString(): String { - return "Some(" + "value=" + .#value + ")" - } - } interface MyList : List> { @@ -65,3 +65,4 @@ class FinalList : SomeList { } } + diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.ir.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.ir.txt index 9c7e7fa4e33..79a2855789c 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.ir.txt @@ -126,6 +126,27 @@ FILE fqName: fileName:/SignatureClash.kt RETURN type=kotlin.Nothing from='public final fun copy (delegate: .Delegate): .DataClass declared in .DataClass' CONSTRUCTOR_CALL 'public constructor (delegate: .Delegate) declared in .DataClass' type=.DataClass origin=null delegate: GET_VAR 'delegate: .Delegate declared in .DataClass.copy' type=.Delegate origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.DataClass) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.DataClass + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .DataClass' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="DataClass(" + CONST String type=kotlin.String value="delegate=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null + receiver: GET_VAR ': .DataClass declared in .DataClass.toString' type=.DataClass origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.DataClass) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.DataClass + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .DataClass' + CALL 'public open fun hashCode (): kotlin.Int declared in .Delegate' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null + receiver: GET_VAR ': .DataClass declared in .DataClass.hashCode' type=.DataClass origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.DataClass, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -160,24 +181,3 @@ FILE fqName: fileName:/SignatureClash.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .DataClass' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.DataClass) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.DataClass - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .DataClass' - CALL 'public open fun hashCode (): kotlin.Int declared in .Delegate' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null - receiver: GET_VAR ': .DataClass declared in .DataClass.hashCode' type=.DataClass origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.DataClass) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.DataClass - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .DataClass' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="DataClass(" - CONST String type=kotlin.String value="delegate=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null - receiver: GET_VAR ': .DataClass declared in .DataClass.toString' type=.DataClass origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt index 231a65c2926..885787f7327 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt @@ -52,6 +52,14 @@ data class DataClass : Derived, Delegate { return DataClass(delegate = delegate) } + override fun toString(): String { + return "DataClass(" + "delegate=" + .#delegate + ")" + } + + override fun hashCode(): Int { + return .#delegate.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -66,12 +74,5 @@ data class DataClass : Derived, Delegate { return true } - override fun hashCode(): Int { - return .#delegate.hashCode() - } - - override fun toString(): String { - return "DataClass(" + "delegate=" + .#delegate + ")" - } - } + diff --git a/compiler/testData/ir/irText/firProblems/dataObject.fir.ir.txt b/compiler/testData/ir/irText/firProblems/dataObject.fir.ir.txt deleted file mode 100644 index 01deff665da..00000000000 --- a/compiler/testData/ir/irText/firProblems/dataObject.fir.ir.txt +++ /dev/null @@ -1,45 +0,0 @@ -FILE fqName: fileName:/dataObject.kt - CLASS OBJECT name:DataObject modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DataObject - CONSTRUCTOR visibility:private <> () returnType:.DataObject [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:DataObject modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' - FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.DataObject, other:kotlin.Any?) returnType:kotlin.Boolean [operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.DataObject - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=null - BRANCH - if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ - arg0: GET_VAR ': .DataObject declared in .DataObject.equals' type=.DataObject origin=null - arg1: GET_VAR 'other: kotlin.Any? declared in .DataObject.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .DataObject' - CONST Boolean type=kotlin.Boolean value=true - WHEN type=kotlin.Unit origin=null - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=.DataObject - GET_VAR 'other: kotlin.Any? declared in .DataObject.equals' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .DataObject' - CONST Boolean type=kotlin.Boolean value=false - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.DataObject [val] - TYPE_OP type=.DataObject origin=CAST typeOperand=.DataObject - GET_VAR 'other: kotlin.Any? declared in .DataObject.equals' type=kotlin.Any? origin=null - RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .DataObject' - CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.DataObject) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.DataObject - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .DataObject' - CONST Int type=kotlin.Int value=-1155894359 - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.DataObject) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.DataObject - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .DataObject' - CONST String type=kotlin.String value="DataObject" diff --git a/compiler/testData/ir/irText/firProblems/dataObject.fir.kt.txt b/compiler/testData/ir/irText/firProblems/dataObject.fir.kt.txt deleted file mode 100644 index 72ea1dcf206..00000000000 --- a/compiler/testData/ir/irText/firProblems/dataObject.fir.kt.txt +++ /dev/null @@ -1,28 +0,0 @@ -data object DataObject { - private constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - - override operator fun equals(other: Any?): Boolean { - when { - EQEQEQ(arg0 = , arg1 = other) -> return true - } - when { - other !is DataObject -> return false - } - val tmp0_other_with_cast: DataObject = other as DataObject - return true - } - - override fun hashCode(): Int { - return -1155894359 - } - - override fun toString(): String { - return "DataObject" - } - -} - diff --git a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.ir.txt b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.ir.txt index 0dc4f58c815..8eee5270434 100644 --- a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.ir.txt @@ -19,6 +19,27 @@ FILE fqName: fileName:/valueClassEquals.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Z' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null receiver: GET_VAR ': .Z declared in .Z.' type=.Z origin=null + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Z) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Z + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Z' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Z(" + CONST String type=kotlin.String value="s=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .Z declared in .Z.toString' type=.Z origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Z) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Z + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Z' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .Z declared in .Z.hashCode' type=.Z origin=null FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Z, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -46,27 +67,6 @@ FILE fqName: fileName:/valueClassEquals.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Z' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Z) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Z - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Z' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Z declared in .Z.hashCode' type=.Z origin=null - FUN GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Z) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Z - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Z' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Z(" - CONST String type=kotlin.String value="s=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .Z declared in .Z.toString' type=.Z origin=null - CONST String type=kotlin.String value=")" PROPERTY name:equals visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:equals type:kotlin.reflect.KFunction2<.Z, kotlin.Any?, kotlin.Boolean> visibility:private [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt index e221d500d89..8eecd2fc7e5 100644 --- a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt @@ -10,6 +10,14 @@ value class Z { field = s get + override fun toString(): String { + return "Z(" + "s=" + .#s + ")" + } + + override fun hashCode(): Int { + return .#s.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { other !is Z -> return false @@ -21,14 +29,6 @@ value class Z { return true } - override fun hashCode(): Int { - return .#s.hashCode() - } - - override fun toString(): String { - return "Z(" + "s=" + .#s + ")" - } - } val equals: KFunction2 diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.ir.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.ir.txt index 1db3a0b3004..27a2a7e93c3 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.ir.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.ir.txt @@ -56,6 +56,41 @@ FILE fqName: fileName:/destructuringInLambda.kt CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int, y: kotlin.Int) declared in .A' type=.A origin=null x: GET_VAR 'x: kotlin.Int declared in .A.copy' type=kotlin.Int origin=null y: GET_VAR 'y: kotlin.Int declared in .A.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="A(" + CONST String type=kotlin.String value="x=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="y=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + VAR name:result type:kotlin.Int [var] + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null + SET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Unit origin=EQ + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=31 + other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' + GET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Int origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.A, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -100,41 +135,6 @@ FILE fqName: fileName:/destructuringInLambda.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .A' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null - SET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.hashCode' type=.A origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' - GET_VAR 'var result: kotlin.Int declared in .A.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.A) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="A(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="y=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .A declared in .A.toString' type=.A origin=null - CONST String type=kotlin.String value=")" PROPERTY name:fn visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:fn type:kotlin.Function1<.A, kotlin.Int> visibility:private [static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt index 10602425604..7a8fce2c676 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt @@ -25,6 +25,16 @@ data class A { return A(x = x, y = y) } + override fun toString(): String { + return "A(" + "x=" + .#x + ", " + "y=" + .#y + ")" + } + + override fun hashCode(): Int { + var result: Int = .#x.hashCode() + result = result.times(other = 31).plus(other = .#y.hashCode()) + return result + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -42,16 +52,6 @@ data class A { return true } - override fun hashCode(): Int { - var result: Int = .#x.hashCode() - result = result.times(other = 31).plus(other = .#y.hashCode()) - return result - } - - override fun toString(): String { - return "A(" + "x=" + .#x + ", " + "y=" + .#y + ")" - } - } var fn: Function1 @@ -62,3 +62,4 @@ var fn: Function1 get set + diff --git a/compiler/testData/ir/irText/regressions/kt45236.fir.ir.txt b/compiler/testData/ir/irText/regressions/kt45236.fir.ir.txt index cfff7216c66..7da47a8041f 100644 --- a/compiler/testData/ir/irText/regressions/kt45236.fir.ir.txt +++ b/compiler/testData/ir/irText/regressions/kt45236.fir.ir.txt @@ -78,6 +78,50 @@ FILE fqName: fileName:/kt45236.kt : T of .NetRequestStatus.Error error: GET_VAR 'error: kotlin.Throwable declared in .NetRequestStatus.Error.copy' type=kotlin.Throwable origin=null value: GET_VAR 'value: T of .NetRequestStatus.Error? declared in .NetRequestStatus.Error.copy' type=T of .NetRequestStatus.Error? origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.NetRequestStatus.Error.NetRequestStatus.Error>) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.NetRequestStatus.Error.NetRequestStatus.Error> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .NetRequestStatus.Error' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Error(" + CONST String type=kotlin.String value="error=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:error type:kotlin.Throwable visibility:private [final]' type=kotlin.Throwable origin=null + receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.toString' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="value=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null + receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.toString' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.NetRequestStatus.Error.NetRequestStatus.Error>) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.NetRequestStatus.Error.NetRequestStatus.Error> + BLOCK_BODY + VAR name:result type:kotlin.Int [var] + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Throwable' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:error type:kotlin.Throwable visibility:private [final]' type=kotlin.Throwable origin=null + receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null + SET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Unit origin=EQ + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=31 + other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null + receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null + arg1: CONST Null type=kotlin.Nothing? value=null + then: CONST Int type=kotlin.Int value=0 + BRANCH + if: CONST Boolean type=kotlin.Boolean value=true + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null + receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .NetRequestStatus.Error' + GET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Int origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.NetRequestStatus.Error.NetRequestStatus.Error>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -122,50 +166,6 @@ FILE fqName: fileName:/kt45236.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .NetRequestStatus.Error' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.NetRequestStatus.Error.NetRequestStatus.Error>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.NetRequestStatus.Error.NetRequestStatus.Error> - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Throwable' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:error type:kotlin.Throwable visibility:private [final]' type=kotlin.Throwable origin=null - receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null - SET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null - receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null - receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.hashCode' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .NetRequestStatus.Error' - GET_VAR 'var result: kotlin.Int declared in .NetRequestStatus.Error.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.NetRequestStatus.Error.NetRequestStatus.Error>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.NetRequestStatus.Error.NetRequestStatus.Error> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .NetRequestStatus.Error' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Error(" - CONST String type=kotlin.String value="error=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:error type:kotlin.Throwable visibility:private [final]' type=kotlin.Throwable origin=null - receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.toString' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="value=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .NetRequestStatus.Error? visibility:private [final]' type=T of .NetRequestStatus.Error? origin=null - receiver: GET_VAR ': .NetRequestStatus.Error.NetRequestStatus.Error> declared in .NetRequestStatus.Error.toString' type=.NetRequestStatus.Error.NetRequestStatus.Error> origin=null - CONST String type=kotlin.String value=")" 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 diff --git a/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.Array.fir.ir.txt b/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.Array.fir.ir.txt index 290c5b408ad..2e7d62c8acc 100644 --- a/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.Array.fir.ir.txt +++ b/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.Array.fir.ir.txt @@ -18,16 +18,16 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Array modality:FINAL visibility:pu annotations: IntrinsicConstEvaluation $this: VALUE_PARAMETER name:$this type:kotlin.Array + 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:$this 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:$this type:kotlin.Any 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 [operator] declared in kotlin.Any $this: VALUE_PARAMETER name:$this type:kotlin.Any VALUE_PARAMETER BUILTIN_CLASS_METHOD 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:$this 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:$this type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.IntArray.fir.ir.txt b/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.IntArray.fir.ir.txt index b06fbfaf9f9..3cc141c728b 100644 --- a/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.IntArray.fir.ir.txt +++ b/compiler/testData/ir/irText/stubs/arraysFromBuiltins.__kotlin.IntArray.fir.ir.txt @@ -17,16 +17,16 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:IntArray modality:FINAL visibility annotations: IntrinsicConstEvaluation $this: VALUE_PARAMETER name:$this type:kotlin.IntArray + 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:$this 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:$this type:kotlin.Any 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 [operator] declared in kotlin.Any $this: VALUE_PARAMETER name:$this type:kotlin.Any VALUE_PARAMETER BUILTIN_CLASS_METHOD 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:$this 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:$this type:kotlin.Any diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.ir.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.ir.txt index f4852e2fbeb..8f823463a62 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.ir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.ir.txt @@ -182,6 +182,41 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int, y: kotlin.Int) declared in .P' type=.P origin=null x: GET_VAR 'x: kotlin.Int declared in .P.copy' type=kotlin.Int origin=null y: GET_VAR 'y: kotlin.Int declared in .P.copy' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.P) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.P + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .P' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="P(" + CONST String type=kotlin.String value="x=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .P declared in .P.toString' type=.P origin=null + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="y=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .P declared in .P.toString' type=.P origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.P) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.P + BLOCK_BODY + VAR name:result type:kotlin.Int [var] + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .P declared in .P.hashCode' type=.P origin=null + SET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Unit origin=EQ + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value=31 + other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .P declared in .P.hashCode' type=.P origin=null + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .P' + GET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Int origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.P, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -226,38 +261,3 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .P' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.P) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.P - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .P declared in .P.hashCode' type=.P origin=null - SET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=31 - other: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .P declared in .P.hashCode' type=.P origin=null - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .P' - GET_VAR 'var result: kotlin.Int declared in .P.hashCode' type=kotlin.Int origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.P) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.P - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .P' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="P(" - CONST String type=kotlin.String value="x=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .P declared in .P.toString' type=.P origin=null - CONST String type=kotlin.String value=", " - CONST String type=kotlin.String value="y=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .P declared in .P.toString' type=.P origin=null - CONST String type=kotlin.String value=")" diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt index f85a040e351..115636a1f14 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt @@ -101,6 +101,16 @@ data class P { return P(x = x, y = y) } + override fun toString(): String { + return "P(" + "x=" + .#x + ", " + "y=" + .#y + ")" + } + + override fun hashCode(): Int { + var result: Int = .#x.hashCode() + result = result.times(other = 31).plus(other = .#y.hashCode()) + return result + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -118,15 +128,5 @@ data class P { return true } - override fun hashCode(): Int { - var result: Int = .#x.hashCode() - result = result.times(other = 31).plus(other = .#y.hashCode()) - return result - } - - override fun toString(): String { - return "P(" + "x=" + .#x + ", " + "y=" + .#y + ")" - } - } diff --git a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.ir.txt b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.ir.txt index dde3cdc69c4..423b68d0039 100644 --- a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.ir.txt +++ b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.ir.txt @@ -37,6 +37,27 @@ FILE fqName: fileName:/typeAliasWithUnsafeVariance.kt CONSTRUCTOR_CALL 'public constructor (action: kotlin.Function1.Tag, kotlin.Unit>) declared in .Tag' type=.Tag.Tag> origin=null : RenderingT of .Tag action: GET_VAR 'action: kotlin.Function1.Tag, kotlin.Unit> declared in .Tag.copy' type=kotlin.Function1.Tag, kotlin.Unit> origin=null + FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Tag.Tag>) returnType:kotlin.String + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Tag.Tag> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Tag' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="Tag(" + CONST String type=kotlin.String value="action=" + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1.Tag, kotlin.Unit> origin=null + receiver: GET_VAR ': .Tag.Tag> declared in .Tag.toString' type=.Tag.Tag> origin=null + CONST String type=kotlin.String value=")" + FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Tag.Tag>) returnType:kotlin.Int + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:.Tag.Tag> + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Tag' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Function1' type=kotlin.Int origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1.Tag, kotlin.Unit> origin=null + receiver: GET_VAR ': .Tag.Tag> declared in .Tag.hashCode' type=.Tag.Tag> origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Tag.Tag>, other:kotlin.Any?) returnType:kotlin.Boolean [operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -71,27 +92,6 @@ FILE fqName: fileName:/typeAliasWithUnsafeVariance.kt CONST Boolean type=kotlin.Boolean value=false RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Tag' CONST Boolean type=kotlin.Boolean value=true - FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:.Tag.Tag>) returnType:kotlin.Int - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Tag.Tag> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Tag' - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Function1' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1.Tag, kotlin.Unit> origin=null - receiver: GET_VAR ': .Tag.Tag> declared in .Tag.hashCode' type=.Tag.Tag> origin=null - FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:.Tag.Tag>) returnType:kotlin.String - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:.Tag.Tag> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Tag' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Tag(" - CONST String type=kotlin.String value="action=" - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1.Tag, kotlin.Unit> origin=null - receiver: GET_VAR ': .Tag.Tag> declared in .Tag.toString' type=.Tag.Tag> origin=null - CONST String type=kotlin.String value=")" FUN name:getTag visibility:public modality:FINAL <> () returnType:.Tag<*> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun getTag (): .Tag<*> declared in ' diff --git a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt index e72122e415e..4c5ff34e459 100644 --- a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt +++ b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt @@ -18,6 +18,14 @@ data class Tag { return Tag(action = action) } + override fun toString(): String { + return "Tag(" + "action=" + .#action + ")" + } + + override fun hashCode(): Int { + return .#action.hashCode() + } + override operator fun equals(other: Any?): Boolean { when { EQEQEQ(arg0 = , arg1 = other) -> return true @@ -32,14 +40,6 @@ data class Tag { return true } - override fun hashCode(): Int { - return .#action.hashCode() - } - - override fun toString(): String { - return "Tag(" + "action=" + .#action + ")" - } - } fun getTag(): Tag<*> { @@ -49,3 +49,4 @@ fun getTag(): Tag<*> { fun doAction() { getTag().() /*~> Unit */ } + 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 1a45550daa4..81d5ace4c0a 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 @@ -355,6 +355,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2624,12 +2630,6 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest runTest("compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index eb0cac340ad..5904b6122d1 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -274,6 +274,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { runTest("compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.kt"); @@ -1980,11 +1985,6 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/firProblems/cannotCastToFunction.kt"); } - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() throws Exception { runTest("compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt"); 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 1999517bc11..4ee9cebd959 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 @@ -307,6 +307,12 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2270,12 +2276,6 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/firProblems/cannotCastToFunction.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() 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 7318d5c620e..36046491579 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 @@ -307,6 +307,12 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2270,12 +2276,6 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/cannotCastToFunction.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() 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 b7877c13227..14b1fe25e30 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 @@ -307,6 +307,12 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt"); } + @Test + @TestMetadata("dataObject.kt") + public void testDataObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses/dataObject.kt"); + } + @Test @TestMetadata("delegationInSealed.kt") public void testDelegationInSealed() throws Exception { @@ -2270,12 +2276,6 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/cannotCastToFunction.kt"); } - @Test - @TestMetadata("dataObject.kt") - public void testDataObject() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/dataObject.kt"); - } - @Test @TestMetadata("DeepCopyIrTree.kt") public void testDeepCopyIrTree() throws Exception {