diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt index 2d34c498647..7079279f461 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt @@ -64,6 +64,9 @@ internal class ClassMemberGenerator( } // Add synthetic members *before* fake override generations. // Otherwise, redundant members, e.g., synthetic toString _and_ fake override toString, will be added. + if (irClass.isInline && klass.getPrimaryConstructorIfAny() != null) { + processedCallableNames += DataClassMembersGenerator(components).generateInlineClassMembers(klass, irClass) + } if (irClass.isData && klass.getPrimaryConstructorIfAny() != null) { processedCallableNames += DataClassMembersGenerator(components).generateDataClassMembers(klass, irClass) } 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 1fcec1cea04..cf29d0c43e5 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 @@ -26,6 +26,7 @@ import org.jetbrains.kotlin.fir.types.impl.FirImplicitIntTypeRef import org.jetbrains.kotlin.fir.types.impl.FirImplicitNullableAnyTypeRef import org.jetbrains.kotlin.fir.types.impl.FirImplicitStringTypeRef import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.builders.IrGeneratorContextBase import org.jetbrains.kotlin.ir.declarations.* @@ -43,7 +44,8 @@ import org.jetbrains.kotlin.name.Name class DataClassMembersGenerator(val components: Fir2IrComponents) { - // TODO: generateInlineClassMembers + fun generateInlineClassMembers(klass: FirClass<*>, irClass: IrClass): List = + MyDataClassMethodsGenerator(irClass, klass.symbol.classId, IrDeclarationOrigin.GENERATED_INLINE_CLASS_MEMBER).generate(klass) fun generateDataClassMembers(klass: FirClass<*>, irClass: IrClass): List = MyDataClassMethodsGenerator(irClass, klass.symbol.classId, IrDeclarationOrigin.GENERATED_DATA_CLASS_MEMBER).generate(klass) @@ -261,6 +263,12 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { parent = irClass functionDescriptor.bind(this) dispatchReceiverParameter = generateDispatchReceiverParameter(this, thisReceiverDescriptor) + components.irBuiltIns.anyClass.descriptor.unsubstitutedMemberScope + .getContributedFunctions(this.name, NoLookupLocation.FROM_BACKEND) + .singleOrNull { function -> function.name == this.name } + ?.let { + overriddenSymbols = listOf(components.symbolTable.referenceSimpleFunction(it)) + } } } diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt index 7789c637457..a39f071a6bc 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt @@ -191,13 +191,13 @@ class DeclarationsConverter( /** * @see org.jetbrains.kotlin.parsing.KotlinParsing.parseModifierList */ - private fun convertModifierList(modifiers: LighterASTNode): Modifier { + private fun convertModifierList(modifiers: LighterASTNode, isInClass: Boolean = false): Modifier { val modifier = Modifier() modifiers.forEachChildren { when (it.tokenType) { ANNOTATION -> modifier.annotations += convertAnnotation(it) ANNOTATION_ENTRY -> modifier.annotations += convertAnnotationEntry(it) - is KtModifierKeywordToken -> modifier.addModifier(it) + is KtModifierKeywordToken -> modifier.addModifier(it, isInClass) } } return modifier @@ -343,7 +343,7 @@ class DeclarationsConverter( var typeParameterList: LighterASTNode? = null classNode.forEachChildren { when (it.tokenType) { - MODIFIER_LIST -> modifiers = convertModifierList(it) + MODIFIER_LIST -> modifiers = convertModifierList(it, isInClass = true) CLASS_KEYWORD -> classKind = ClassKind.CLASS INTERFACE_KEYWORD -> classKind = ClassKind.INTERFACE OBJECT_KEYWORD -> classKind = ClassKind.OBJECT @@ -379,7 +379,7 @@ class DeclarationsConverter( isInner = modifiers.isInner() isCompanion = modifiers.isCompanion() && classKind == ClassKind.OBJECT isData = modifiers.isDataClass() && classKind != ClassKind.OBJECT - isInline = modifiers.hasInline() + isInline = modifiers.isInlineClass() && classKind != ClassKind.OBJECT } val classBuilder = if (status.modality == Modality.SEALED) { diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt index d9366dd812d..fc2bc97c9bf 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.CLASS_MODIFIER import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.FUNCTION_MODIFIER +import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.INLINE_MODIFIER import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.INHERITANCE_MODIFIER import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.MEMBER_MODIFIER import org.jetbrains.kotlin.fir.lightTree.fir.modifier.ModifierSets.PARAMETER_MODIFIER @@ -31,9 +32,15 @@ class Modifier( ) { val annotations: MutableList = mutableListOf() - fun addModifier(modifier: LighterASTNode) { + fun addModifier(modifier: LighterASTNode, isInClass: Boolean = false) { val tokenType = modifier.tokenType when { + INLINE_MODIFIER.contains(tokenType) -> { + if (isInClass) + this.classModifiers += ClassModifier.valueOf(modifier.toString().toUpperCase()) + else + this.functionModifiers += FunctionModifier.valueOf(modifier.toString().toUpperCase()) + } CLASS_MODIFIER.contains(tokenType) -> this.classModifiers += ClassModifier.valueOf(modifier.toString().toUpperCase()) MEMBER_MODIFIER.contains(tokenType) -> this.memberModifiers += MemberModifier.valueOf(modifier.toString().toUpperCase()) VISIBILITY_MODIFIER.contains(tokenType) -> this.visibilityModifiers += @@ -59,6 +66,10 @@ class Modifier( return classModifiers.contains(ClassModifier.DATA) } + fun isInlineClass(): Boolean { + return classModifiers.contains(ClassModifier.INLINE) + } + fun isInner(): Boolean { return classModifiers.contains(ClassModifier.INNER) } diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt index 2e2a9897410..1d924b2bd13 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.fir.lightTree.fir.modifier import com.intellij.psi.tree.TokenSet -import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens.* object ModifierSets { @@ -24,15 +23,13 @@ object ModifierSets { INTERNAL_KEYWORD, PROTECTED_KEYWORD ) - val FUNCTION_MODIFIER = - TokenSet.create( - TAILREC_KEYWORD, - OPERATOR_KEYWORD, - INFIX_KEYWORD, - INLINE_KEYWORD, - EXTERNAL_KEYWORD, - SUSPEND_KEYWORD - ) + val FUNCTION_MODIFIER = TokenSet.create( + TAILREC_KEYWORD, + OPERATOR_KEYWORD, + INFIX_KEYWORD, + EXTERNAL_KEYWORD, + SUSPEND_KEYWORD + ) val PROPERTY_MODIFIER = TokenSet.create(CONST_KEYWORD) val INHERITANCE_MODIFIER = TokenSet.create( ABSTRACT_KEYWORD, @@ -44,4 +41,5 @@ object ModifierSets { val PLATFORM_MODIFIER = TokenSet.create(EXPECT_KEYWORD, ACTUAL_KEYWORD, HEADER_KEYWORD, IMPL_KEYWORD) val VARIANCE_MODIFIER = TokenSet.create(IN_KEYWORD, OUT_KEYWORD) val REIFICATION_MODIFIER = TokenSet.create(REIFIED_KEYWORD) + val INLINE_MODIFIER = TokenSet.create(INLINE_KEYWORD) } \ No newline at end of file diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt index a2ea6374fb3..ac93c08fd0f 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt @@ -5,15 +5,11 @@ package org.jetbrains.kotlin.fir.lightTree.fir.modifier -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.descriptors.Visibilities -import org.jetbrains.kotlin.descriptors.Visibility -import org.jetbrains.kotlin.types.Variance - enum class ClassModifier { ENUM, ANNOTATION, DATA, + INLINE, INNER, COMPANION } diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index a6a2e1209a5..d83d21a16c8 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -660,7 +660,7 @@ class RawFirBuilder( isInner = classOrObject.hasModifier(INNER_KEYWORD) isCompanion = (classOrObject as? KtObjectDeclaration)?.isCompanion() == true isData = (classOrObject as? KtClass)?.isData() == true - isInline = classOrObject.hasModifier(INLINE_KEYWORD) + isInline = (classOrObject as? KtClass)?.hasModifier(INLINE_KEYWORD) == true } withCapturedTypeParameters { if (!status.isInner) context.capturedTypeParameters = context.capturedTypeParameters.clear() diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt index b63d9f51033..e118fcf83a4 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/covariantOverrideSuspendFunWithNullableInlineClass_NullableAny_null.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/constructorWithInlineClassParameters.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/constructorWithInlineClassParameters.kt index c0124e64a03..329ee0c376e 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/constructorWithInlineClassParameters.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/constructorWithInlineClassParameters.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt index 2e7b888f123..217ee16afbb 100644 --- a/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class Foo(val x: Int) inline class FooRef(val y: String) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNonNull.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNonNull.kt index 53e8503994a..a95008b5d45 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNonNull.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNonNull.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: String) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullable.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullable.kt index c13cda40791..6198fcc1fed 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullable.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullable.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: Any?) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt index 515762c1795..ec617c1c778 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNonNull.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNonNull.kt index becf4fdea17..8eb2092fe7f 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksNonNull.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNonNull.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: String) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNullable.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNullable.kt index dbb0c10cdcf..a2c7ac4faaf 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksNullable.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNullable.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: Any?) diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt index 2cfb4e65898..8031254ad1e 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class A(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt index cee155ab622..2a43d97f524 100644 --- a/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt +++ b/compiler/testData/codegen/box/inlineClasses/functionNameMangling/reflectionForPropertyOfInlineClassType.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt index e510c3877cf..bc34918261e 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassInStringTemplate.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassWithDefaultFunctionsFromAny.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassWithDefaultFunctionsFromAny.kt index a6ded9f57a0..3899a4a35f6 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassWithDefaultFunctionsFromAny.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassWithDefaultFunctionsFromAny.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class Z(val data: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/kt27113a.kt b/compiler/testData/codegen/box/inlineClasses/kt27113a.kt index 34929d64320..f8313d2af33 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt27113a.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt27113a.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME inline class A(val a: Any) diff --git a/compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNull.kt b/compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNull.kt index a7bb871c2f2..1d87365ee16 100644 --- a/compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNull.kt +++ b/compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNull.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class Z(val value: Int) diff --git a/compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt b/compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt index 31d81341c46..63fd30aa0d7 100644 --- a/compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt +++ b/compiler/testData/codegen/box/reflection/call/inlineClasses/functionsWithInlineClassParameters.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt b/compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt index 6d680cbb21c..99127cfb472 100644 --- a/compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt +++ b/compiler/testData/codegen/box/reflection/callBy/inlineClassDefaultArguments.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt b/compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt index 841abbf58bc..35bd29827b7 100644 --- a/compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt +++ b/compiler/testData/codegen/box/reflection/callBy/inlineClassFunctionsAndConstructors.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.fir.txt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.fir.txt index 6ba6af4c8ff..3d9952d2154 100644 --- a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.fir.txt +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.fir.txt @@ -218,6 +218,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test1 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -330,6 +332,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' @@ -385,6 +389,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' @@ -472,6 +478,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt : kotlin.Any 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -504,6 +512,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' @@ -511,6 +521,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' @@ -556,6 +568,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt CONSTRUCTOR_CALL 'public constructor (anyArrayN: kotlin.Array?) [primary] 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test3 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -588,6 +602,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' @@ -604,6 +620,8 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' diff --git a/compiler/testData/ir/irText/classes/dataClasses.fir.txt b/compiler/testData/ir/irText/classes/dataClasses.fir.txt index c9c76d9eea7..43bad152efd 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.fir.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.fir.txt @@ -80,6 +80,8 @@ FILE fqName: fileName:/dataClasses.kt 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test1 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -132,6 +134,8 @@ FILE fqName: fileName:/dataClasses.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' @@ -151,6 +155,8 @@ FILE fqName: fileName:/dataClasses.kt $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 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' @@ -203,6 +209,8 @@ FILE fqName: fileName:/dataClasses.kt CONSTRUCTOR_CALL 'public constructor (x: kotlin.Any?) [primary] 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test2 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -235,6 +243,8 @@ FILE fqName: fileName:/dataClasses.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' @@ -251,6 +261,8 @@ FILE fqName: fileName:/dataClasses.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' @@ -364,6 +376,8 @@ FILE fqName: fileName:/dataClasses.kt 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test3 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -426,6 +440,8 @@ FILE fqName: fileName:/dataClasses.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' @@ -469,6 +485,8 @@ FILE fqName: fileName:/dataClasses.kt $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 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' diff --git a/compiler/testData/ir/irText/classes/dataClassesGeneric.fir.txt b/compiler/testData/ir/irText/classes/dataClassesGeneric.fir.txt index 23e1b08f868..635912065f4 100644 --- a/compiler/testData/ir/irText/classes/dataClassesGeneric.fir.txt +++ b/compiler/testData/ir/irText/classes/dataClassesGeneric.fir.txt @@ -36,6 +36,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt : kotlin.Any 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test1.Test1> VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -68,6 +70,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1.Test1> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test1' @@ -84,6 +88,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.Test1.Test1> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test1' @@ -130,6 +136,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt : kotlin.Any 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -162,6 +170,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test2' @@ -169,6 +179,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.Test2.Test2> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test2' @@ -215,6 +227,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt : kotlin.Any 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test3.Test3> VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -247,6 +261,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3.Test3> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test3' @@ -254,6 +270,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.Test3.Test3> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test3' @@ -298,6 +316,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt CONSTRUCTOR_CALL 'public constructor (x: kotlin.collections.List) [primary] 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test4 VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -330,6 +350,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test4 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test4' @@ -337,6 +359,8 @@ FILE fqName: fileName:/dataClassesGeneric.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.Test4 BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test4' diff --git a/compiler/testData/ir/irText/classes/inlineClass.fir.txt b/compiler/testData/ir/irText/classes/inlineClass.fir.txt index 9586dd40b1d..80169231003 100644 --- a/compiler/testData/ir/irText/classes/inlineClass.fir.txt +++ b/compiler/testData/ir/irText/classes/inlineClass.fir.txt @@ -17,16 +17,51 @@ FILE fqName: fileName:/inlineClass.kt 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 FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN GENERATED_INLINE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.Test, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER name: type:.Test + VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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 [operator] 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 [val] 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_INLINE_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:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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 [fake_override] 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_INLINE_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:kotlin.Any + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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/inlineClassSyntheticMethods.fir.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.txt index 0d9e1378685..88ae92012f3 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.txt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.fir.txt @@ -60,19 +60,54 @@ FILE fqName: fileName:/inlineClassSyntheticMethods.kt CALL 'public final 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 FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN GENERATED_INLINE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.IC.IC>, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER name: type:.IC.IC> + VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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 [operator] 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> [val] 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_INLINE_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:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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 kotlin.Any' 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_INLINE_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:kotlin.Any + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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] diff --git a/compiler/testData/ir/irText/classes/kt31649.fir.txt b/compiler/testData/ir/irText/classes/kt31649.fir.txt index 1a7068df6c7..30d6ffb8a4e 100644 --- a/compiler/testData/ir/irText/classes/kt31649.fir.txt +++ b/compiler/testData/ir/irText/classes/kt31649.fir.txt @@ -34,6 +34,8 @@ FILE fqName: fileName:/kt31649.kt CONSTRUCTOR_CALL 'public constructor (nn: kotlin.Nothing?) [primary] 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.TestData VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -66,6 +68,8 @@ FILE fqName: fileName:/kt31649.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.TestData BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .TestData' @@ -82,6 +86,8 @@ FILE fqName: fileName:/kt31649.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.TestData BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .TestData' @@ -109,16 +115,60 @@ FILE fqName: fileName:/kt31649.kt 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 FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN GENERATED_INLINE_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.TestInline, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER name: type:.TestInline + VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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 [operator] 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 [val] 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_INLINE_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:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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_INLINE_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:kotlin.Any + $this: VALUE_PARAMETER GENERATED_INLINE_CLASS_MEMBER 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/lambdaInDataClassDefaultParameter.fir.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt index 3c0245b1ba6..50075c49f48 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt @@ -42,6 +42,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONSTRUCTOR_CALL 'public constructor (runA: kotlin.Function2<.A, kotlin.String, kotlin.Unit>) [primary] declared in .A' type=.A origin=null runA: GET_VAR 'runA: kotlin.Function2<.A, kotlin.String, kotlin.Unit> declared in .A.copy' type=kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=null FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:.A, other:kotlin.Any?) returnType:kotlin.Boolean + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.A VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -74,6 +76,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' @@ -81,6 +85,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:kotlin.Function2<.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=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 GENERATED_DATA_CLASS_MEMBER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' @@ -147,6 +153,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONSTRUCTOR_CALL 'public constructor (x: kotlin.Any) [primary] 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:equals visibility:public modality:OPEN <> ($this:.B, other:kotlin.Any?) returnType:kotlin.Boolean + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.B VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -179,6 +187,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .B' @@ -186,6 +196,8 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt $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 GENERATED_DATA_CLASS_MEMBER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .B' diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.txt index 3ddcb3359b4..1e5f5aeb099 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.fir.txt @@ -61,6 +61,8 @@ FILE fqName: fileName:/dataClassMembers.kt 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 + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.Test.Test> VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -103,6 +105,8 @@ FILE fqName: fileName:/dataClassMembers.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test.Test> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .Test' @@ -125,6 +129,8 @@ FILE fqName: fileName:/dataClassMembers.kt $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 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 GENERATED_DATA_CLASS_MEMBER name: type:.Test.Test> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .Test' diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt index 45cc97fea42..91806386d48 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt @@ -57,6 +57,8 @@ FILE fqName: fileName:/destructuringInLambda.kt 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:equals visibility:public modality:OPEN <> ($this:.A, other:kotlin.Any?) returnType:kotlin.Boolean + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.A VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -99,6 +101,8 @@ FILE fqName: fileName:/destructuringInLambda.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .A' @@ -112,6 +116,8 @@ FILE fqName: fileName:/destructuringInLambda.kt $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 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 GENERATED_DATA_CLASS_MEMBER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .A' diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt index 755ef6f8e58..b179868b8ba 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt @@ -172,6 +172,8 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt 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:equals visibility:public modality:OPEN <> ($this:.P, other:kotlin.Any?) returnType:kotlin.Boolean + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name: type:.P VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any? BLOCK_BODY @@ -214,6 +216,8 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt 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 GENERATED_DATA_CLASS_MEMBER name: type:.P BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in .P' @@ -227,6 +231,8 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt $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 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 GENERATED_DATA_CLASS_MEMBER name: type:.P BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in .P'