From 30182c38ced260a5f292addfbfd8ff987b5f4251 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Thu, 25 May 2017 17:42:13 +0300 Subject: [PATCH] Fix toString and hashCode for array members of data classes Generate them as special intrinsics that would be mapped to proper platform-specific calls by BEs. #KT-16945 Fixed --- .../generators/DataClassMembersGenerator.kt | 31 +- .../kotlin/ir/builders/ExpressionHelpers.kt | 3 + .../kotlin/ir/descriptors/IrBuiltIns.kt | 19 +- .../classes/dataClassWithArrayMembers.kt | 19 + .../classes/dataClassWithArrayMembers.txt | 635 ++++++++++++++++++ .../kotlin/ir/IrTextTestCaseGenerated.java | 6 + 6 files changed, 705 insertions(+), 8 deletions(-) create mode 100644 compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt create mode 100644 compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DataClassMembersGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DataClassMembersGenerator.kt index b5276895095..6b022765582 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DataClassMembersGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DataClassMembersGenerator.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.psi2ir.generators import com.intellij.psi.PsiElement import org.jetbrains.kotlin.backend.common.DataClassMethodGenerator +import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.builders.* @@ -160,8 +161,13 @@ class DataClassMembersGenerator(declarationGenerator: DeclarationGenerator) : De val typeConstructorDescriptor = type.constructor.declarationDescriptor return when (typeConstructorDescriptor) { is ClassDescriptor -> { - val hashCodeDescriptor: CallableDescriptor = typeConstructorDescriptor.findFirstFunction("hashCode") { it.valueParameters.isEmpty() } - context.symbolTable.referenceFunction(hashCodeDescriptor) + if (KotlinBuiltIns.isArrayOrPrimitiveArray(typeConstructorDescriptor)) { + context.irBuiltIns.dataClassArrayMemberHashCodeSymbol + } + else { + val hashCodeDescriptor: CallableDescriptor = typeConstructorDescriptor.findFirstFunction("hashCode") { it.valueParameters.isEmpty() } + context.symbolTable.referenceFunction(hashCodeDescriptor) + } } is TypeParameterDescriptor -> getHashCodeFunction(context.builtIns.anyType) // TODO @@ -200,7 +206,14 @@ class DataClassMembersGenerator(declarationGenerator: DeclarationGenerator) : De } private fun MemberFunctionBuilder.getHashCodeOf(irValue: IrExpression): IrExpression = - irCall(getHashCodeFunction(irValue.type), intType).apply { dispatchReceiver = irValue } + irCall(getHashCodeFunction(irValue.type)).apply { + if (descriptor.dispatchReceiverParameter != null) { + dispatchReceiver = irValue + } + else { + putValueArgument(0, irValue) + } + } override fun generateToStringMethod(function: FunctionDescriptor, properties: List) { buildMember(function) { @@ -210,7 +223,17 @@ class DataClassMembersGenerator(declarationGenerator: DeclarationGenerator) : De for (property in properties) { if (!first) irConcat.addArgument(irString(", ")) irConcat.addArgument(irString(property.name.asString() + "=")) - irConcat.addArgument(irGet(irThis(), getPropertyGetterSymbol(property))) + val irPropertyValue = irGet(irThis(), getPropertyGetterSymbol(property)) + val typeConstructorDescriptor = property.type.constructor.declarationDescriptor + val irPropertyStringValue = + if (typeConstructorDescriptor is ClassDescriptor && + KotlinBuiltIns.isArrayOrPrimitiveArray(typeConstructorDescriptor)) + irCall(context.irBuiltIns.dataClassArrayMemberToStringSymbol).apply { + putValueArgument(0, irPropertyValue) + } + else + irPropertyValue + irConcat.addArgument(irPropertyStringValue) first = false } irConcat.addArgument(irString(")")) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt index e9ab258a8bd..29db7dd4861 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt @@ -140,6 +140,9 @@ fun IrBuilderWithScope.irGet(receiver: IrExpression, getterSymbol: IrFunctionSym fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, type: KotlinType): IrCall = IrCallImpl(startOffset, endOffset, type, callee, callee.descriptor, null) +fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol): IrCall = + irCall(callee, callee.descriptor.returnType!!) + fun IrBuilderWithScope.irCallOp(callee: IrFunctionSymbol, dispatchReceiver: IrExpression, argument: IrExpression): IrCall = irCall(callee, callee.descriptor.returnType!!).apply { this.dispatchReceiver = dispatchReceiver diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltIns.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltIns.kt index f2e30135994..68e802a47bf 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltIns.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBuiltIns.kt @@ -65,6 +65,7 @@ class IrBuiltIns(val builtIns: KotlinBuiltIns) { val int = builtIns.intType val nothing = builtIns.nothingType val unit = builtIns.unitType + val string = builtIns.stringType val eqeqeqFun = defineOperator("EQEQEQ", bool, listOf(anyN, anyN)) val eqeqFun = defineOperator("EQEQ", bool, listOf(anyN, anyN)) @@ -96,7 +97,11 @@ class IrBuiltIns(val builtIns: KotlinBuiltIns) { val booleanNotSymbol = booleanNotFun.symbol val noWhenBranchMatchedExceptionSymbol = noWhenBranchMatchedExceptionFun.symbol - val enumValueOfFun = + val enumValueOfFun = createEnumValueOfFun() + val enumValueOf = enumValueOfFun.descriptor + val enumValueOfSymbol = enumValueOfFun.symbol + + private fun createEnumValueOfFun(): IrSimpleFunction = SimpleFunctionDescriptorImpl.create( packageFragment, Annotations.EMPTY, @@ -110,15 +115,21 @@ class IrBuiltIns(val builtIns: KotlinBuiltIns) { val valueParameterName = ValueParameterDescriptorImpl( this, null, 0, Annotations.EMPTY, Name.identifier("name"), builtIns.stringType, - false, false, false, null, org.jetbrains.kotlin.descriptors.SourceElement.NO_SOURCE + false, false, false, null, SourceElement.NO_SOURCE ) val returnType = KotlinTypeFactory.simpleType(Annotations.EMPTY, typeParameterT.typeConstructor, listOf(), false) initialize(null, null, listOf(typeParameterT), listOf(valueParameterName), returnType, Modality.FINAL, Visibilities.PUBLIC) }.addStub() - val enumValueOf = enumValueOfFun.descriptor - val enumValueOfSymbol = enumValueOfFun.symbol + + val dataClassArrayMemberHashCodeFun = defineOperator("dataClassArrayMemberHashCode", int, listOf(any)) + val dataClassArrayMemberHashCode = dataClassArrayMemberHashCodeFun.descriptor + val dataClassArrayMemberHashCodeSymbol = dataClassArrayMemberHashCodeFun.symbol + + val dataClassArrayMemberToStringFun = defineOperator("dataClassArrayMemberToString", string, listOf(anyN)) + val dataClassArrayMemberToString = dataClassArrayMemberToStringFun.descriptor + val dataClassArrayMemberToStringSymbol = dataClassArrayMemberToStringFun.symbol companion object { val KOTLIN_INTERNAL_IR_FQN = FqName("kotlin.internal.ir") diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt new file mode 100644 index 00000000000..8a8663dfd93 --- /dev/null +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt @@ -0,0 +1,19 @@ +data class Test1( + val stringArray: Array, + val charArray: CharArray, + val booleanArray: BooleanArray, + val byteArray: ByteArray, + val shortArray: ShortArray, + val intArray: IntArray, + val longArray: LongArray, + val floatArray: FloatArray, + val doubleArray: DoubleArray +) + +data class Test2( + val genericArray: Array +) + +data class Test3( + val anyArrayN: Array? +) \ No newline at end of file diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt new file mode 100644 index 00000000000..c61c6cee876 --- /dev/null +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt @@ -0,0 +1,635 @@ +FILE /dataClassWithArrayMembers.kt + CLASS CLASS Test1 + $this: VALUE_PARAMETER this@Test1: Test1 + CONSTRUCTOR public constructor 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) + VALUE_PARAMETER value-parameter stringArray: kotlin.Array + VALUE_PARAMETER value-parameter charArray: kotlin.CharArray + VALUE_PARAMETER value-parameter booleanArray: kotlin.BooleanArray + VALUE_PARAMETER value-parameter byteArray: kotlin.ByteArray + VALUE_PARAMETER value-parameter shortArray: kotlin.ShortArray + VALUE_PARAMETER value-parameter intArray: kotlin.IntArray + VALUE_PARAMETER value-parameter longArray: kotlin.LongArray + VALUE_PARAMETER value-parameter floatArray: kotlin.FloatArray + VALUE_PARAMETER value-parameter doubleArray: kotlin.DoubleArray + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' + PROPERTY public final val stringArray: kotlin.Array + FIELD PROPERTY_BACKING_FIELD public final val stringArray: kotlin.Array + EXPRESSION_BODY + GET_VAR 'value-parameter stringArray: Array' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Array + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): Array' + GET_FIELD 'stringArray: Array' type=kotlin.Array origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val charArray: kotlin.CharArray + FIELD PROPERTY_BACKING_FIELD public final val charArray: kotlin.CharArray + EXPRESSION_BODY + GET_VAR 'value-parameter charArray: CharArray' type=kotlin.CharArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.CharArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): CharArray' + GET_FIELD 'charArray: CharArray' type=kotlin.CharArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val booleanArray: kotlin.BooleanArray + FIELD PROPERTY_BACKING_FIELD public final val booleanArray: kotlin.BooleanArray + EXPRESSION_BODY + GET_VAR 'value-parameter booleanArray: BooleanArray' type=kotlin.BooleanArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.BooleanArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): BooleanArray' + GET_FIELD 'booleanArray: BooleanArray' type=kotlin.BooleanArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val byteArray: kotlin.ByteArray + FIELD PROPERTY_BACKING_FIELD public final val byteArray: kotlin.ByteArray + EXPRESSION_BODY + GET_VAR 'value-parameter byteArray: ByteArray' type=kotlin.ByteArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.ByteArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): ByteArray' + GET_FIELD 'byteArray: ByteArray' type=kotlin.ByteArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val shortArray: kotlin.ShortArray + FIELD PROPERTY_BACKING_FIELD public final val shortArray: kotlin.ShortArray + EXPRESSION_BODY + GET_VAR 'value-parameter shortArray: ShortArray' type=kotlin.ShortArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.ShortArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): ShortArray' + GET_FIELD 'shortArray: ShortArray' type=kotlin.ShortArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val intArray: kotlin.IntArray + FIELD PROPERTY_BACKING_FIELD public final val intArray: kotlin.IntArray + EXPRESSION_BODY + GET_VAR 'value-parameter intArray: IntArray' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.IntArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): IntArray' + GET_FIELD 'intArray: IntArray' type=kotlin.IntArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val longArray: kotlin.LongArray + FIELD PROPERTY_BACKING_FIELD public final val longArray: kotlin.LongArray + EXPRESSION_BODY + GET_VAR 'value-parameter longArray: LongArray' type=kotlin.LongArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.LongArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): LongArray' + GET_FIELD 'longArray: LongArray' type=kotlin.LongArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val floatArray: kotlin.FloatArray + FIELD PROPERTY_BACKING_FIELD public final val floatArray: kotlin.FloatArray + EXPRESSION_BODY + GET_VAR 'value-parameter floatArray: FloatArray' type=kotlin.FloatArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.FloatArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): FloatArray' + GET_FIELD 'floatArray: FloatArray' type=kotlin.FloatArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY public final val doubleArray: kotlin.DoubleArray + FIELD PROPERTY_BACKING_FIELD public final val doubleArray: kotlin.DoubleArray + EXPRESSION_BODY + GET_VAR 'value-parameter doubleArray: DoubleArray' type=kotlin.DoubleArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.DoubleArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): DoubleArray' + GET_FIELD 'doubleArray: DoubleArray' type=kotlin.DoubleArray origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Array + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component1(): Array' + CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.CharArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component2(): CharArray' + CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.BooleanArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component3(): BooleanArray' + CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component4(): kotlin.ByteArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component4(): ByteArray' + CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component5(): kotlin.ShortArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component5(): ShortArray' + CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component6(): kotlin.IntArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component6(): IntArray' + CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component7(): kotlin.LongArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component7(): LongArray' + CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component8(): kotlin.FloatArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component8(): FloatArray' + CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component9(): kotlin.DoubleArray + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component9(): DoubleArray' + CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN GENERATED_DATA_CLASS_MEMBER 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 + $this: VALUE_PARAMETER this@Test1: Test1 + VALUE_PARAMETER value-parameter stringArray: kotlin.Array = ... + EXPRESSION_BODY + CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter charArray: kotlin.CharArray = ... + EXPRESSION_BODY + CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter booleanArray: kotlin.BooleanArray = ... + EXPRESSION_BODY + CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter byteArray: kotlin.ByteArray = ... + EXPRESSION_BODY + CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter shortArray: kotlin.ShortArray = ... + EXPRESSION_BODY + CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter intArray: kotlin.IntArray = ... + EXPRESSION_BODY + CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter longArray: kotlin.LongArray = ... + EXPRESSION_BODY + CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter floatArray: kotlin.FloatArray = ... + EXPRESSION_BODY + CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + VALUE_PARAMETER value-parameter doubleArray: kotlin.DoubleArray = ... + EXPRESSION_BODY + CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + BLOCK_BODY + RETURN type=kotlin.Nothing from='copy(Array = ..., CharArray = ..., BooleanArray = ..., ByteArray = ..., ShortArray = ..., IntArray = ..., LongArray = ..., FloatArray = ..., DoubleArray = ...): Test1' + CALL 'constructor Test1(Array, CharArray, BooleanArray, ByteArray, ShortArray, IntArray, LongArray, FloatArray, DoubleArray)' type=Test1 origin=null + stringArray: GET_VAR 'value-parameter stringArray: Array = ...' type=kotlin.Array origin=null + charArray: GET_VAR 'value-parameter charArray: CharArray = ...' type=kotlin.CharArray origin=null + booleanArray: GET_VAR 'value-parameter booleanArray: BooleanArray = ...' type=kotlin.BooleanArray origin=null + byteArray: GET_VAR 'value-parameter byteArray: ByteArray = ...' type=kotlin.ByteArray origin=null + shortArray: GET_VAR 'value-parameter shortArray: ShortArray = ...' type=kotlin.ShortArray origin=null + intArray: GET_VAR 'value-parameter intArray: IntArray = ...' type=kotlin.IntArray origin=null + longArray: GET_VAR 'value-parameter longArray: LongArray = ...' type=kotlin.LongArray origin=null + floatArray: GET_VAR 'value-parameter floatArray: FloatArray = ...' type=kotlin.FloatArray origin=null + doubleArray: GET_VAR 'value-parameter doubleArray: DoubleArray = ...' type=kotlin.DoubleArray origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='toString(): String' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value='Test1(' + CONST String type=kotlin.String value='stringArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='charArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='booleanArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='byteArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='shortArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='intArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='longArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='floatArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=', ' + CONST String type=kotlin.String value='doubleArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + CONST String type=kotlin.String value=')' + FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int + CONST Int type=kotlin.Int value='0' + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'plus(Int): Int' type=kotlin.Int origin=null + $this: CALL 'times(Int): Int' type=kotlin.Int origin=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + other: CONST Int type=kotlin.Int value='31' + other: CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + RETURN type=kotlin.Nothing from='hashCode(): Int' + GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean + $this: VALUE_PARAMETER this@Test1: Test1 + VALUE_PARAMETER value-parameter other: kotlin.Any? + BLOCK_BODY + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ + arg0: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + 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 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test1 + TYPE_OP type=Test1 origin=CAST typeOperand=Test1 + GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + arg1: CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='true' + CLASS CLASS Test2 + $this: VALUE_PARAMETER this@Test2: Test2 + TYPE_PARAMETER + CONSTRUCTOR public constructor Test2(genericArray: kotlin.Array) + VALUE_PARAMETER value-parameter genericArray: kotlin.Array + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' + PROPERTY public final val genericArray: kotlin.Array + FIELD PROPERTY_BACKING_FIELD public final val genericArray: kotlin.Array + EXPRESSION_BODY + GET_VAR 'value-parameter genericArray: Array' type=kotlin.Array origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Array + $this: VALUE_PARAMETER this@Test2: Test2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): Array' + GET_FIELD 'genericArray: Array' type=kotlin.Array origin=null + receiver: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Array + $this: VALUE_PARAMETER this@Test2: Test2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component1(): Array' + CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(genericArray: kotlin.Array = ...): Test2 + $this: VALUE_PARAMETER this@Test2: Test2 + VALUE_PARAMETER value-parameter genericArray: kotlin.Array = ... + EXPRESSION_BODY + CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + BLOCK_BODY + RETURN type=kotlin.Nothing from='copy(Array = ...): Test2' + CALL 'constructor Test2(Array)' type=Test2 origin=null + : null + genericArray: GET_VAR 'value-parameter genericArray: Array = ...' type=kotlin.Array origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String + $this: VALUE_PARAMETER this@Test2: Test2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='toString(): String' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value='Test2(' + CONST String type=kotlin.String value='genericArray=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + CONST String type=kotlin.String value=')' + FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int + $this: VALUE_PARAMETER this@Test2: Test2 + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int + CONST Int type=kotlin.Int value='0' + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + CALL 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + RETURN type=kotlin.Nothing from='hashCode(): Int' + GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean + $this: VALUE_PARAMETER this@Test2: Test2 + VALUE_PARAMETER value-parameter other: kotlin.Any? + BLOCK_BODY + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ + arg0: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + 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 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test2 + TYPE_OP type=Test2 origin=CAST typeOperand=Test2 + GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null + arg1: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test2' type=Test2 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='true' + CLASS CLASS Test3 + $this: VALUE_PARAMETER this@Test3: Test3 + CONSTRUCTOR public constructor Test3(anyArrayN: kotlin.Array?) + VALUE_PARAMETER value-parameter anyArrayN: kotlin.Array? + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test3' + PROPERTY public final val anyArrayN: kotlin.Array? + FIELD PROPERTY_BACKING_FIELD public final val anyArrayN: kotlin.Array? + EXPRESSION_BODY + GET_VAR 'value-parameter anyArrayN: Array?' type=kotlin.Array? origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Array? + $this: VALUE_PARAMETER this@Test3: Test3 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): Array?' + GET_FIELD 'anyArrayN: Array?' type=kotlin.Array? origin=null + receiver: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Array? + $this: VALUE_PARAMETER this@Test3: Test3 + BLOCK_BODY + RETURN type=kotlin.Nothing from='component1(): Array?' + CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(anyArrayN: kotlin.Array? = ...): Test3 + $this: VALUE_PARAMETER this@Test3: Test3 + VALUE_PARAMETER value-parameter anyArrayN: kotlin.Array? = ... + EXPRESSION_BODY + CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + BLOCK_BODY + RETURN type=kotlin.Nothing from='copy(Array? = ...): Test3' + CALL 'constructor Test3(Array?)' type=Test3 origin=null + anyArrayN: GET_VAR 'value-parameter anyArrayN: Array? = ...' type=kotlin.Array? origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String + $this: VALUE_PARAMETER this@Test3: Test3 + BLOCK_BODY + RETURN type=kotlin.Nothing from='toString(): String' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value='Test3(' + CONST String type=kotlin.String value='anyArrayN=' + CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null + arg0: CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + CONST String type=kotlin.String value=')' + FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int + $this: VALUE_PARAMETER this@Test3: Test3 + BLOCK_BODY + VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int + CONST Int type=kotlin.Int value='0' + SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Array? + CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + WHEN type=kotlin.Int origin=null + BRANCH + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ + arg0: GET_VAR 'tmp1: Array?' type=kotlin.Array? 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 'dataClassArrayMemberHashCode(Any): Int' type=kotlin.Int origin=null + arg0: GET_VAR 'tmp1: Array?' type=kotlin.Array? origin=null + RETURN type=kotlin.Nothing from='hashCode(): Int' + GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null + FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean + $this: VALUE_PARAMETER this@Test3: Test3 + VALUE_PARAMETER value-parameter other: kotlin.Any? + BLOCK_BODY + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ + arg0: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + 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 'value-parameter other: Any?' type=kotlin.Any? origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test3 + TYPE_OP type=Test3 origin=CAST typeOperand=Test3 + GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null + WHEN type=kotlin.Unit origin=null + BRANCH + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ + arg0: CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null + arg1: CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test3' type=Test3 origin=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='false' + RETURN type=kotlin.Nothing from='equals(Any?): Boolean' + CONST Boolean type=kotlin.Boolean value='true' diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index d774f21a5a3..84385635066 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -74,6 +74,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { doTest(fileName); } + @TestMetadata("dataClassWithArrayMembers.kt") + public void testDataClassWithArrayMembers() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt"); + doTest(fileName); + } + @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/dataClasses.kt");