From a416cddcb2416285545d04d357c900b2c4e5978b Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Fri, 17 Mar 2017 16:31:48 +0300 Subject: [PATCH] Generate declarations for FAKE_OVERRIDE members --- .../psi2ir/generators/ClassGenerator.kt | 20 +++- .../psi2ir/generators/DeclarationGenerator.kt | 41 +++++++-- .../ir/declarations/IrDeclarationOrigin.kt | 1 + ...tReorderingInDelegatingConstructorCall.txt | 17 ++++ .../ir/irText/classes/classMembers.txt | 12 +++ .../testData/ir/irText/classes/classes.txt | 23 +++++ .../ir/irText/classes/companionObject.txt | 12 +++ .../classes/delegatedImplementation.txt | 18 ++++ ...atedImplementationWithExplicitOverride.txt | 9 ++ ...gConstructorCallToTypeAliasConstructor.txt | 13 +++ ...onstructorCallsInSecondaryConstructors.txt | 6 ++ compiler/testData/ir/irText/classes/enum.txt | 92 +++++++++++++++++++ .../irText/classes/enumWithSecondaryCtor.txt | 59 ++++++++++++ .../testData/ir/irText/classes/initBlock.txt | 18 ++++ .../testData/ir/irText/classes/initVal.txt | 9 ++ .../testData/ir/irText/classes/initVar.txt | 18 ++++ .../testData/ir/irText/classes/innerClass.txt | 9 ++ .../innerClassWithDelegatingConstructor.txt | 6 ++ .../ir/irText/classes/localClasses.txt | 3 + .../classes/objectLiteralExpressions.txt | 22 +++++ .../irText/classes/objectWithInitializers.txt | 6 ++ .../ir/irText/classes/outerClassAccess.txt | 9 ++ .../ir/irText/classes/primaryConstructor.txt | 9 ++ ...aryConstructorWithSuperConstructorCall.txt | 12 +++ .../ir/irText/classes/qualifiedSuperCalls.txt | 9 ++ .../ir/irText/classes/sealedClasses.txt | 12 +++ ...nstructorWithInitializersFromClassBody.txt | 9 ++ .../irText/classes/secondaryConstructors.txt | 3 + .../testData/ir/irText/classes/superCalls.txt | 6 ++ .../declarations/classLevelProperties.txt | 3 + .../declarations/delegatedProperties.txt | 3 + .../ir/irText/declarations/fakeOverrides.kt | 15 +++ .../ir/irText/declarations/fakeOverrides.txt | 53 +++++++++++ .../declarations/interfaceProperties.txt | 3 + .../irText/declarations/parameters/class.txt | 15 +++ .../declarations/parameters/constructor.txt | 15 +++ .../parameters/defaultPropertyAccessors.txt | 6 ++ .../parameters/delegatedMembers.txt | 6 ++ .../ir/irText/declarations/parameters/fun.txt | 3 + .../parameters/propertyAccessors.txt | 3 + .../primaryCtorDefaultArguments.txt | 3 + .../declarations/primaryCtorProperties.txt | 3 + .../provideDelegate/differentReceivers.txt | 3 + .../declarations/provideDelegate/local.txt | 6 ++ .../localDifferentReceivers.txt | 3 + .../declarations/provideDelegate/member.txt | 9 ++ .../provideDelegate/memberExtension.txt | 6 ++ .../declarations/provideDelegate/topLevel.txt | 6 ++ .../ir/irText/declarations/typeAlias.txt | 3 + .../irText/errors/suppressedNonPublicCall.txt | 3 + .../expressions/arrayAugmentedAssignment1.txt | 3 + .../expressions/arrayAugmentedAssignment2.txt | 6 ++ .../ir/irText/expressions/assignments.txt | 3 + .../expressions/augmentedAssignment2.txt | 3 + .../augmentedAssignmentWithExpression.txt | 3 + .../expressions/boundCallableReferences.txt | 3 + .../irText/expressions/chainOfSafeCalls.txt | 3 + .../ir/irText/expressions/classReference.txt | 3 + .../complexAugmentedAssignment.txt | 15 +++ .../ir/irText/expressions/contructorCall.txt | 3 + .../expressions/conventionComparisons.txt | 6 ++ .../ir/irText/expressions/destructuring1.txt | 6 ++ .../destructuringWithUnderscore.txt | 6 ++ .../expressions/forWithImplicitReceivers.txt | 9 ++ .../expressions/jvmInstanceFieldReference.txt | 4 + .../expressions/jvmStaticFieldReference.txt | 3 + .../expressions/membersImportedFromObject.txt | 3 + .../irText/expressions/objectAsCallable.txt | 14 +++ .../expressions/objectClassReference.txt | 3 + .../primitivesImplicitConversions.txt | 3 + .../irText/expressions/reflectionLiterals.txt | 3 + .../ir/irText/expressions/safeAssignment.txt | 3 + .../safeCallWithIncrementDecrement.txt | 3 + .../ir/irText/expressions/safeCalls.txt | 6 ++ .../expressions/setFieldWithImplicitCast.txt | 4 + .../smartCastsWithDestructuring.txt | 6 ++ .../ir/irText/expressions/typeOperators.txt | 3 + .../testData/ir/irText/expressions/values.txt | 20 ++++ .../testData/ir/irText/expressions/when.txt | 3 + .../lambdas/multipleImplicitReceivers.txt | 12 +++ .../irText/regressions/integerCoercionToT.txt | 9 ++ .../ir/irText/singletons/companion.txt | 6 ++ .../testData/ir/irText/singletons/object.txt | 6 ++ .../kotlin/ir/IrTextTestCaseGenerated.java | 6 ++ 84 files changed, 836 insertions(+), 9 deletions(-) create mode 100644 compiler/testData/ir/irText/declarations/fakeOverrides.kt create mode 100644 compiler/testData/ir/irText/declarations/fakeOverrides.txt diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt index 2733cddbc5b..140673258e2 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt @@ -35,6 +35,7 @@ import org.jetbrains.kotlin.renderer.OverrideRenderingPolicy import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter +import org.jetbrains.kotlin.utils.addToStdlib.safeAs import java.lang.AssertionError import java.util.* @@ -53,6 +54,8 @@ class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGe generateMembersDeclaredInClassBody(irClass, ktClassOrObject) + generateFakeOverrideMemberDeclarations(irClass) + if (descriptor.isData) { generateAdditionalMembersForDataClass(irClass, ktClassOrObject) } @@ -64,7 +67,20 @@ class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGe return irClass } - private object StableDelegatesComparator : Comparator { + private fun generateFakeOverrideMemberDeclarations(irClass: IrClass) { + irClass.descriptor.unsubstitutedMemberScope.getContributedDescriptors() + .mapNotNull { + it.safeAs().takeIf { + it?.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE + } + } + .sortedWith(StableCallableMembersComparator) + .forEach { fakeOverride -> + irClass.addMember(declarationGenerator.generateFakeOverrideDeclaration(fakeOverride)) + } + } + + private object StableCallableMembersComparator : Comparator { override fun compare(member1: CallableMemberDescriptor?, member2: CallableMemberDescriptor?): Int { if (member1 == member2) return 0 if (member1 == null) return -1 @@ -91,7 +107,7 @@ class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGe .getContributedDescriptors(DescriptorKindFilter.CALLABLES) .filterIsInstance() .filter { it.kind == CallableMemberDescriptor.Kind.DELEGATION } - .sortedWith(StableDelegatesComparator) + .sortedWith(StableCallableMembersComparator) if (delegatedMembers.isEmpty()) return for (ktEntry in ktSuperTypeList.entries) { diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DeclarationGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DeclarationGenerator.kt index 30277e05534..d8d21246ae9 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DeclarationGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/DeclarationGenerator.kt @@ -16,15 +16,10 @@ package org.jetbrains.kotlin.psi2ir.generators -import org.jetbrains.kotlin.descriptors.CallableDescriptor -import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor +import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.declarations.impl.IrAnonymousInitializerImpl -import org.jetbrains.kotlin.ir.declarations.impl.IrErrorDeclarationImpl -import org.jetbrains.kotlin.ir.declarations.impl.IrTypeAliasImpl -import org.jetbrains.kotlin.ir.declarations.impl.IrTypeParameterImpl +import org.jetbrains.kotlin.ir.declarations.impl.* import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.psi.* @@ -99,6 +94,38 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator { fun generateInitializerBody(scopeOwner: CallableDescriptor, ktBody: KtExpression): IrExpressionBody = createBodyGenerator(scopeOwner).generateExpressionBody(ktBody) + + fun generateFakeOverrideDeclaration(memberDescriptor: CallableMemberDescriptor, ktElement: KtElement? = null): IrDeclaration { + assert(memberDescriptor.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) { + "Fake override expected: $memberDescriptor" + } + return when (memberDescriptor) { + is FunctionDescriptor -> + generateFakeOverrideFunction(memberDescriptor, ktElement) + is PropertyDescriptor -> + generateFakeOverrideProperty(memberDescriptor, ktElement) + else -> + throw AssertionError("Unexpected member descriptor: $memberDescriptor") + } + } + + private fun generateFakeOverrideProperty(propertyDescriptor: PropertyDescriptor, ktElement: KtElement?): IrProperty = + IrPropertyImpl( + ktElement.startOffsetOrUndefined, ktElement.endOffsetOrUndefined, + IrDeclarationOrigin.FAKE_OVERRIDE, + false, + propertyDescriptor, + null, + propertyDescriptor.getter?.let { generateFakeOverrideFunction(it, ktElement) }, + propertyDescriptor.setter?.let { generateFakeOverrideFunction(it, ktElement) } + ) + + private fun generateFakeOverrideFunction(functionDescriptor: FunctionDescriptor, ktElement: KtElement?): IrFunction = + IrFunctionImpl( + ktElement.startOffsetOrUndefined, ktElement.endOffsetOrUndefined, + IrDeclarationOrigin.FAKE_OVERRIDE, + functionDescriptor + ) } abstract class DeclarationGeneratorExtension(val declarationGenerator: DeclarationGenerator) : Generator { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt index 5bbc06dafe2..0b134ffec4b 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclarationOrigin.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.ir.declarations interface IrDeclarationOrigin { object DEFINED : IrDeclarationOriginImpl("DEFINED") + object FAKE_OVERRIDE : IrDeclarationOriginImpl("FAKE_OVERRIDE") object PROPERTY_BACKING_FIELD : IrDeclarationOriginImpl("PROPERTY_BACKING_FIELD") object DEFAULT_PROPERTY_ACCESSOR : IrDeclarationOriginImpl("DEFAULT_PROPERTY_ACCESSOR") object DELEGATE : IrDeclarationOriginImpl("DELEGATE") diff --git a/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt b/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt index c987bdec7a4..e72ed1b82c8 100644 --- a/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt @@ -26,6 +26,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'y: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=Base origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test1 CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int) VALUE_PARAMETER value-parameter xx: kotlin.Int @@ -40,6 +43,13 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt x: GET_VAR 'tmp1_x: Int' type=kotlin.Int origin=null y: GET_VAR 'tmp0_y: Int' type=kotlin.Int origin=null INSTANCE_INITIALIZER_CALL classDescriptor='Test1' + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val y: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2(xx: kotlin.Int, yy: kotlin.Int) VALUE_PARAMETER value-parameter xx: kotlin.Int @@ -67,3 +77,10 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int, Int)' xx: GET_VAR 'tmp1_xx: Int' type=kotlin.Int origin=null yy: GET_VAR 'tmp0_yy: Int' type=kotlin.Int origin=null + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val y: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/classMembers.txt b/compiler/testData/ir/irText/classes/classMembers.txt index d694149bb81..f371dc57f37 100644 --- a/compiler/testData/ir/irText/classes/classMembers.txt +++ b/compiler/testData/ir/irText/classes/classMembers.txt @@ -99,6 +99,9 @@ FILE /classMembers.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='4' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE NestedInterface FUN public abstract fun foo(): kotlin.Unit $this: VALUE_PARAMETER @@ -108,8 +111,17 @@ FILE /classMembers.kt RETURN type=kotlin.Nothing from='bar(): Unit' CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: GET_VAR '' type=C.NestedInterface origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT companion object of C CONSTRUCTOR private constructor Companion() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='companion object of C' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index bb3d96975f4..2ada50eb241 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -4,18 +4,41 @@ FILE /classes.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestClass' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE TestInterface + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT TestObject CONSTRUCTOR private constructor TestObject() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestObject' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS ANNOTATION_CLASS TestAnnotationClass + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS ENUM_CLASS TestEnumClass CONSTRUCTOR private constructor TestEnumClass() BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' INSTANCE_INITIALIZER_CALL classDescriptor='TestEnumClass' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnumClass): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnumClass diff --git a/compiler/testData/ir/irText/classes/companionObject.txt b/compiler/testData/ir/irText/classes/companionObject.txt index 7207fb78546..97513a1bec4 100644 --- a/compiler/testData/ir/irText/classes/companionObject.txt +++ b/compiler/testData/ir/irText/classes/companionObject.txt @@ -9,6 +9,12 @@ FILE /companionObject.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Test1' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2() BLOCK_BODY @@ -19,3 +25,9 @@ FILE /companionObject.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Test2Named' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.txt index 8953453b950..88b9ea1f6ea 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.txt @@ -9,6 +9,9 @@ FILE /delegatedImplementation.kt FUN public abstract fun kotlin.String.qux(): kotlin.Unit $this: VALUE_PARAMETER $receiver: VALUE_PARAMETER + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT BaseImpl CONSTRUCTOR private constructor BaseImpl() BLOCK_BODY @@ -28,6 +31,9 @@ FILE /delegatedImplementation.kt $this: VALUE_PARAMETER $receiver: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IOther PROPERTY public abstract val x: kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun (): kotlin.String @@ -74,6 +80,9 @@ FILE /delegatedImplementation.kt SET_FIELD 'z2: Int on Byte' type=kotlin.Unit origin=null receiver: GET_VAR '' type=IOther origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther VALUE_PARAMETER value-parameter x0: kotlin.String VALUE_PARAMETER value-parameter y0: kotlin.Int @@ -131,6 +140,9 @@ FILE /delegatedImplementation.kt $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter value: kotlin.Int BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'constructor ()' type=otherImpl. origin=OBJECT_LITERAL CLASS CLASS Test1 CONSTRUCTOR public constructor Test1() @@ -165,6 +177,9 @@ FILE /delegatedImplementation.kt $this: GET_FIELD '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null receiver: GET_VAR '' type=Test1 origin=null $receiver: GET_VAR '' type=kotlin.String origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2() BLOCK_BODY @@ -257,3 +272,6 @@ FILE /delegatedImplementation.kt $this: GET_FIELD '`Test2$IOther$delegate`: IOther' type=IOther origin=null receiver: GET_VAR '' type=Test2 origin=null : GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt index b8a52465941..32a2ee3428d 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt @@ -4,6 +4,9 @@ FILE /delegatedImplementationWithExplicitOverride.kt $this: VALUE_PARAMETER FUN public abstract fun bar(): kotlin.Unit $this: VALUE_PARAMETER + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT FooBarImpl CONSTRUCTOR private constructor FooBarImpl() BLOCK_BODY @@ -15,6 +18,9 @@ FILE /delegatedImplementationWithExplicitOverride.kt FUN public open override fun bar(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY @@ -32,3 +38,6 @@ FILE /delegatedImplementationWithExplicitOverride.kt FUN public open override fun bar(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt index 893e9b06b6b..7cb972b351c 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt @@ -17,6 +17,9 @@ FILE /delegatingConstructorCallToTypeAliasConstructor.kt RETURN type=kotlin.Nothing from='(): T' GET_FIELD 'value: T' type=T origin=null receiver: GET_VAR '' type=Cell origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String TYPEALIAS typealias CT = Cell type=Cell TYPEALIAS typealias CStr = Cell type=Cell CLASS CLASS C1 @@ -25,9 +28,19 @@ FILE /delegatingConstructorCallToTypeAliasConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' value: CONST String type=kotlin.String value='O' INSTANCE_INITIALIZER_CALL classDescriptor='C1' + PROPERTY FAKE_OVERRIDE public final override val value: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS C2 CONSTRUCTOR public constructor C2() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' value: CONST String type=kotlin.String value='K' INSTANCE_INITIALIZER_CALL classDescriptor='C2' + PROPERTY FAKE_OVERRIDE public final override val value: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt index 09668a09ba1..d27b8665b45 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt @@ -4,6 +4,9 @@ FILE /delegatingConstructorCallsInSecondaryConstructors.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test CONSTRUCTOR public constructor Test() BLOCK_BODY @@ -18,3 +21,6 @@ FILE /delegatingConstructorCallsInSecondaryConstructors.kt VALUE_PARAMETER value-parameter xx: kotlin.Short BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Test()' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index cf9c6be64ee..66af35d54c3 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -8,6 +8,17 @@ FILE /enum.kt init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' ENUM_ENTRY enum entry TEST2 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum1): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum1 @@ -37,6 +48,17 @@ FILE /enum.kt ENUM_ENTRY enum entry TEST3 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' x: CONST Int type=kotlin.Int value='3' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum2): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum2 @@ -58,8 +80,30 @@ FILE /enum.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='Hello, world!' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum3): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public abstract fun foo(): kotlin.Unit $this: VALUE_PARAMETER + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum3): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum3 @@ -93,6 +137,19 @@ FILE /enum.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: GET_ENUM 'TEST1' type=TestEnum4 + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum4): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String ENUM_ENTRY enum entry TEST2 init: ENUM_CONSTRUCTOR_CALL 'constructor TEST2()' class: CLASS ENUM_ENTRY TEST2 @@ -120,8 +177,32 @@ FILE /enum.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: GET_ENUM 'TEST2' type=TestEnum4 + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum4): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public abstract fun foo(): kotlin.Unit $this: VALUE_PARAMETER + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum4): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum4 @@ -151,6 +232,17 @@ FILE /enum.kt ENUM_ENTRY enum entry TEST3 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum5(Int = ...)' x: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: TestEnum5): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum5 diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt index b9b5f12c042..c5308259ff1 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt @@ -21,6 +21,17 @@ FILE /enumWithSecondaryCtor.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Test0(Int)' x: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Test0): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Test0 @@ -50,6 +61,17 @@ FILE /enumWithSecondaryCtor.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Test1(Int)' x: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Test1): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Test1 @@ -82,6 +104,19 @@ FILE /enumWithSecondaryCtor.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='ZERO' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Test2): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String ENUM_ENTRY enum entry ONE init: ENUM_CONSTRUCTOR_CALL 'constructor ONE()' class: CLASS ENUM_ENTRY ONE @@ -95,12 +130,36 @@ FILE /enumWithSecondaryCtor.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='ONE' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Test2): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val x: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CONSTRUCTOR private constructor Test2() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int)' x: CONST Int type=kotlin.Int value='0' FUN public abstract fun foo(): kotlin.Unit $this: VALUE_PARAMETER + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Test2): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Test2 diff --git a/compiler/testData/ir/irText/classes/initBlock.txt b/compiler/testData/ir/irText/classes/initBlock.txt index 7de3b725a75..21183368499 100644 --- a/compiler/testData/ir/irText/classes/initBlock.txt +++ b/compiler/testData/ir/irText/classes/initBlock.txt @@ -7,6 +7,9 @@ FILE /initBlock.kt ANONYMOUS_INITIALIZER Test1 BLOCK_BODY CALL 'println(): Unit' type=kotlin.Unit origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2(x: kotlin.Int) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -26,6 +29,9 @@ FILE /initBlock.kt ANONYMOUS_INITIALIZER Test2 BLOCK_BODY CALL 'println(): Unit' type=kotlin.Unit origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test3 ANONYMOUS_INITIALIZER Test3 BLOCK_BODY @@ -34,6 +40,9 @@ FILE /initBlock.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test3' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test4 ANONYMOUS_INITIALIZER Test4 BLOCK_BODY @@ -47,6 +56,9 @@ FILE /initBlock.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='2' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test5 CONSTRUCTOR public constructor Test5() BLOCK_BODY @@ -66,3 +78,9 @@ FILE /initBlock.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='2' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/initVal.txt b/compiler/testData/ir/irText/classes/initVal.txt index d517d758b95..a133d855bef 100644 --- a/compiler/testData/ir/irText/classes/initVal.txt +++ b/compiler/testData/ir/irText/classes/initVal.txt @@ -15,6 +15,9 @@ FILE /initVal.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'x: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=TestInitValFromParameter origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitValInClass CONSTRUCTOR public constructor TestInitValInClass() BLOCK_BODY @@ -30,6 +33,9 @@ FILE /initVal.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'x: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=TestInitValInClass origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitValInInitBlock CONSTRUCTOR public constructor TestInitValInInitBlock() BLOCK_BODY @@ -48,3 +54,6 @@ FILE /initVal.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=TestInitValInInitBlock origin=null value: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/initVar.txt b/compiler/testData/ir/irText/classes/initVar.txt index aef6b37cec1..150c9bf3a6e 100644 --- a/compiler/testData/ir/irText/classes/initVar.txt +++ b/compiler/testData/ir/irText/classes/initVar.txt @@ -22,6 +22,9 @@ FILE /initVar.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=TestInitVarFromParameter origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitVarInClass CONSTRUCTOR public constructor TestInitVarInClass() BLOCK_BODY @@ -44,6 +47,9 @@ FILE /initVar.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=TestInitVarInClass origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitVarInInitBlock CONSTRUCTOR public constructor TestInitVarInInitBlock() BLOCK_BODY @@ -69,6 +75,9 @@ FILE /initVar.kt CALL '(Int): Unit' type=kotlin.Unit origin=EQ $this: GET_VAR '' type=TestInitVarInInitBlock origin=null : CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitVarWithCustomSetter CONSTRUCTOR public constructor TestInitVarWithCustomSetter() BLOCK_BODY @@ -91,6 +100,9 @@ FILE /initVar.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ receiver: GET_VAR '' type=TestInitVarWithCustomSetter origin=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor PROPERTY public final var x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int @@ -116,6 +128,9 @@ FILE /initVar.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterWithExplicitCtor' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitVarWithCustomSetterInCtor PROPERTY public final var x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int @@ -139,3 +154,6 @@ FILE /initVar.kt CALL '(Int): Unit' type=kotlin.Unit origin=EQ $this: GET_VAR '' type=TestInitVarWithCustomSetterInCtor origin=null value: CONST Int type=kotlin.Int value='42' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/innerClass.txt b/compiler/testData/ir/irText/classes/innerClass.txt index 4b80d121fef..2221cf59b85 100644 --- a/compiler/testData/ir/irText/classes/innerClass.txt +++ b/compiler/testData/ir/irText/classes/innerClass.txt @@ -10,6 +10,9 @@ FILE /innerClass.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInnerClass' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS DerivedInnerClass CONSTRUCTOR public constructor DerivedInnerClass() $this: VALUE_PARAMETER @@ -17,3 +20,9 @@ FILE /innerClass.kt DELEGATING_CONSTRUCTOR_CALL 'constructor TestInnerClass()' $this: GET_VAR '' type=Outer origin=null INSTANCE_INITIALIZER_CALL classDescriptor='DerivedInnerClass' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.txt b/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.txt index 5d1186d4dde..0f083659940 100644 --- a/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.txt +++ b/compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.txt @@ -27,3 +27,9 @@ FILE /innerClassWithDelegatingConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Inner(Int)' $this: GET_VAR '' type=Outer origin=null x: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/localClasses.txt b/compiler/testData/ir/irText/classes/localClasses.txt index 3c9416b58f2..1e7a579026b 100644 --- a/compiler/testData/ir/irText/classes/localClasses.txt +++ b/compiler/testData/ir/irText/classes/localClasses.txt @@ -9,5 +9,8 @@ FILE /localClasses.kt FUN public final fun foo(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: CALL 'constructor LocalClass()' type=outer.LocalClass origin=null diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt index d37ca8448a6..fcd6f94af5d 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt @@ -2,6 +2,9 @@ FILE /objectLiteralExpressions.kt CLASS INTERFACE IFoo FUN public abstract fun foo(): kotlin.Unit $this: VALUE_PARAMETER + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public val test1: kotlin.Any FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Any EXPRESSION_BODY @@ -11,6 +14,9 @@ FILE /objectLiteralExpressions.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'constructor ()' type=test1. origin=OBJECT_LITERAL FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Any BLOCK_BODY @@ -30,6 +36,9 @@ FILE /objectLiteralExpressions.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='foo' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'constructor ()' type=test2. origin=OBJECT_LITERAL FUN DEFAULT_PROPERTY_ACCESSOR public fun (): IFoo BLOCK_BODY @@ -46,6 +55,10 @@ FILE /objectLiteralExpressions.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Inner' + FUN FAKE_OVERRIDE public abstract override fun foo(): kotlin.Unit + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public final fun test3(): Outer.Inner $this: VALUE_PARAMETER BLOCK_BODY @@ -62,7 +75,13 @@ FILE /objectLiteralExpressions.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='foo' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'constructor ()' type=Outer.test3. origin=OBJECT_LITERAL + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun Outer.test4(): Outer.Inner $receiver: VALUE_PARAMETER BLOCK_BODY @@ -79,4 +98,7 @@ FILE /objectLiteralExpressions.kt BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null message: CONST String type=kotlin.String value='foo' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CALL 'constructor ()' type=test4. origin=OBJECT_LITERAL diff --git a/compiler/testData/ir/irText/classes/objectWithInitializers.txt b/compiler/testData/ir/irText/classes/objectWithInitializers.txt index 0d2ab6f8480..bdada3428b0 100644 --- a/compiler/testData/ir/irText/classes/objectWithInitializers.txt +++ b/compiler/testData/ir/irText/classes/objectWithInitializers.txt @@ -4,6 +4,9 @@ FILE /objectWithInitializers.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT Test CONSTRUCTOR private constructor Test() BLOCK_BODY @@ -33,3 +36,6 @@ FILE /objectWithInitializers.kt receiver: GET_VAR '' type=Test origin=null value: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR '' type=Test origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/outerClassAccess.txt b/compiler/testData/ir/irText/classes/outerClassAccess.txt index 8b3757e7db4..7da2e390905 100644 --- a/compiler/testData/ir/irText/classes/outerClassAccess.txt +++ b/compiler/testData/ir/irText/classes/outerClassAccess.txt @@ -37,3 +37,12 @@ FILE /outerClassAccess.kt BLOCK_BODY CALL 'foo(): Unit' type=kotlin.Unit origin=null $this: GET_VAR '' type=Outer origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/primaryConstructor.txt b/compiler/testData/ir/irText/classes/primaryConstructor.txt index 8fa94c61c6b..36750b5de6d 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructor.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructor.txt @@ -26,6 +26,9 @@ FILE /primaryConstructor.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'y: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=Test1 origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -53,6 +56,9 @@ FILE /primaryConstructor.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'x: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=Test2 origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test3 CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -83,3 +89,6 @@ FILE /primaryConstructor.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=Test3 origin=null value: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt b/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt index e100fa8ba26..e23d387a430 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt @@ -4,16 +4,25 @@ FILE /primaryConstructorWithSuperConstructorCall.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestImplicitPrimaryConstructor CONSTRUCTOR public constructor TestImplicitPrimaryConstructor() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' INSTANCE_INITIALIZER_CALL classDescriptor='TestImplicitPrimaryConstructor' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestExplicitPrimaryConstructor CONSTRUCTOR public constructor TestExplicitPrimaryConstructor() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' INSTANCE_INITIALIZER_CALL classDescriptor='TestExplicitPrimaryConstructor' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestWithDelegatingConstructor CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int, y: kotlin.Int) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -47,3 +56,6 @@ FILE /primaryConstructorWithSuperConstructorCall.kt DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)' x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null y: CONST Int type=kotlin.Int value='0' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt b/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt index e3e002ae0b5..58ab34f3794 100644 --- a/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt +++ b/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt @@ -9,6 +9,9 @@ FILE /qualifiedSuperCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='1' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IRight FUN public open fun foo(): kotlin.Unit $this: VALUE_PARAMETER @@ -19,6 +22,9 @@ FILE /qualifiedSuperCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='2' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS CBoth CONSTRUCTOR public constructor CBoth() BLOCK_BODY @@ -41,3 +47,6 @@ FILE /qualifiedSuperCalls.kt $this: GET_VAR '' type=CBoth origin=null other: CALL '(): Int' superQualifier=IRight type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR '' type=CBoth origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/sealedClasses.txt b/compiler/testData/ir/irText/classes/sealedClasses.txt index c708a8d1d7a..71bb1c6aed7 100644 --- a/compiler/testData/ir/irText/classes/sealedClasses.txt +++ b/compiler/testData/ir/irText/classes/sealedClasses.txt @@ -20,6 +20,9 @@ FILE /sealedClasses.kt RETURN type=kotlin.Nothing from='(): Double' GET_FIELD 'number: Double' type=kotlin.Double origin=null receiver: GET_VAR '' type=Expr.Const origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Sum CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr) VALUE_PARAMETER value-parameter e1: Expr @@ -47,8 +50,17 @@ FILE /sealedClasses.kt RETURN type=kotlin.Nothing from='(): Expr' GET_FIELD 'e2: Expr' type=Expr origin=null receiver: GET_VAR '' type=Expr.Sum origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT NotANumber CONSTRUCTOR private constructor NotANumber() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' INSTANCE_INITIALIZER_CALL classDescriptor='NotANumber' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt index fe7d6bbef8a..a20dcfc4321 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt @@ -4,6 +4,9 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestProperty PROPERTY public final val x: kotlin.Int = 0 FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int = 0 @@ -19,6 +22,9 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' INSTANCE_INITIALIZER_CALL classDescriptor='TestProperty' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInitBlock PROPERTY public final val x: kotlin.Int FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int @@ -46,3 +52,6 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt VALUE_PARAMETER value-parameter y: kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor TestInitBlock()' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/secondaryConstructors.txt b/compiler/testData/ir/irText/classes/secondaryConstructors.txt index f333781e59a..d64951a2d55 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructors.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructors.txt @@ -9,3 +9,6 @@ FILE /secondaryConstructors.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/classes/superCalls.txt b/compiler/testData/ir/irText/classes/superCalls.txt index 0975e2d3d99..2252b9b9501 100644 --- a/compiler/testData/ir/irText/classes/superCalls.txt +++ b/compiler/testData/ir/irText/classes/superCalls.txt @@ -17,6 +17,9 @@ FILE /superCalls.kt RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'bar: String' type=kotlin.String origin=null receiver: GET_VAR '' type=Base origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Derived CONSTRUCTOR public constructor Derived() BLOCK_BODY @@ -34,3 +37,6 @@ FILE /superCalls.kt RETURN type=kotlin.Nothing from='(): String' CALL '(): String' superQualifier=Base type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=Derived origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.txt index ca7f9344ec0..a62ea79f61e 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.txt @@ -130,3 +130,6 @@ FILE /classLevelProperties.kt thisRef: GET_VAR '' type=C origin=null property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index ca32fd5176d..d3d3d487ff1 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -82,6 +82,9 @@ FILE /delegatedProperties.kt thisRef: GET_VAR '' type=C origin=null property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Any' type=kotlin.Any origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public var test4: kotlin.Any FIELD DELEGATE val `test4$delegate`: kotlin.collections.HashMap /* = java.util.HashMap */ EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/fakeOverrides.kt b/compiler/testData/ir/irText/declarations/fakeOverrides.kt new file mode 100644 index 00000000000..c66bdecee49 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/fakeOverrides.kt @@ -0,0 +1,15 @@ +interface IFooStr { + fun foo(x: String) +} + +interface IBar { + val bar: Int +} + +abstract class CFoo { + fun foo(x: T) {} +} + +class Test1 : CFoo(), IFooStr, IBar { + override val bar: Int = 42 +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/fakeOverrides.txt b/compiler/testData/ir/irText/declarations/fakeOverrides.txt new file mode 100644 index 00000000000..d2c5575c164 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/fakeOverrides.txt @@ -0,0 +1,53 @@ +FILE /fakeOverrides.kt + CLASS INTERFACE IFooStr + FUN public abstract fun foo(x: kotlin.String): kotlin.Unit + $this: VALUE_PARAMETER + VALUE_PARAMETER value-parameter x: kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + CLASS INTERFACE IBar + PROPERTY public abstract val bar: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun (): kotlin.Int + $this: VALUE_PARAMETER + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): Int' + GET_FIELD 'bar: Int' type=kotlin.Int origin=null + receiver: GET_VAR '' type=IBar origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + CLASS CLASS CFoo + TYPE_PARAMETER + CONSTRUCTOR public constructor CFoo() + TYPE_PARAMETER + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='CFoo' + FUN public final fun foo(x: T): kotlin.Unit + $this: VALUE_PARAMETER + VALUE_PARAMETER value-parameter x: T + BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + CLASS CLASS Test1 + CONSTRUCTOR public constructor Test1() + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor CFoo()' + : String + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' + PROPERTY public open override val bar: kotlin.Int = 42 + FIELD PROPERTY_BACKING_FIELD public open override val bar: kotlin.Int = 42 + EXPRESSION_BODY + CONST Int type=kotlin.Int value='42' + FUN DEFAULT_PROPERTY_ACCESSOR public open override fun (): kotlin.Int + $this: VALUE_PARAMETER + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): Int' + GET_FIELD 'bar: Int' type=kotlin.Int origin=null + receiver: GET_VAR '' type=Test1 origin=null + FUN FAKE_OVERRIDE public final override fun foo(x: kotlin.String): kotlin.Unit + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/interfaceProperties.txt b/compiler/testData/ir/irText/declarations/interfaceProperties.txt index 2f2836e5aee..76b2f7d3281 100644 --- a/compiler/testData/ir/irText/declarations/interfaceProperties.txt +++ b/compiler/testData/ir/irText/declarations/interfaceProperties.txt @@ -37,3 +37,6 @@ FILE /interfaceProperties.kt $this: VALUE_PARAMETER VALUE_PARAMETER value-parameter value: kotlin.Int BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/class.txt b/compiler/testData/ir/irText/declarations/parameters/class.txt index 1a18b0a4642..8a562ab9a94 100644 --- a/compiler/testData/ir/irText/declarations/parameters/class.txt +++ b/compiler/testData/ir/irText/declarations/parameters/class.txt @@ -3,6 +3,12 @@ FILE /class.kt TYPE_PARAMETER CLASS INTERFACE TestNestedInterface TYPE_PARAMETER + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test TYPE_PARAMETER CONSTRUCTOR public constructor Test() @@ -17,6 +23,9 @@ FILE /class.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestNested' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS TestInner TYPE_PARAMETER CONSTRUCTOR public constructor TestInner() @@ -25,3 +34,9 @@ FILE /class.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInner' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/constructor.txt b/compiler/testData/ir/irText/declarations/parameters/constructor.txt index ade3ecad840..08fa083ccad 100644 --- a/compiler/testData/ir/irText/declarations/parameters/constructor.txt +++ b/compiler/testData/ir/irText/declarations/parameters/constructor.txt @@ -30,6 +30,9 @@ FILE /constructor.kt RETURN type=kotlin.Nothing from='(): T2' GET_FIELD 'y: T2' type=T2 origin=null receiver: GET_VAR '' type=Test1 origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.String) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -76,6 +79,12 @@ FILE /constructor.kt : Z $this: GET_VAR '' type=Test2 origin=null z: GET_VAR 'value-parameter z: Z' type=Z origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test3 CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.String = ...) VALUE_PARAMETER value-parameter x: kotlin.Int @@ -105,6 +114,9 @@ FILE /constructor.kt RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'y: String' type=kotlin.String origin=null receiver: GET_VAR '' type=Test3 origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test4 TYPE_PARAMETER CONSTRUCTOR public constructor Test4(x: kotlin.Int) @@ -135,3 +147,6 @@ FILE /constructor.kt x: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS $this: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null other: GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.txt b/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.txt index fb7bf5ae7cf..03bfcbf6b7f 100644 --- a/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.txt +++ b/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.txt @@ -52,6 +52,9 @@ FILE /defaultPropertyAccessors.kt SET_FIELD 'testMember2: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=Host origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS InPrimaryCtor TYPE_PARAMETER CONSTRUCTOR public constructor InPrimaryCtor(testInPrimaryCtor1: T, testInPrimaryCtor2: kotlin.Int = ...) @@ -90,3 +93,6 @@ FILE /defaultPropertyAccessors.kt SET_FIELD 'testInPrimaryCtor2: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=InPrimaryCtor origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt index 296efc71936..4813768ef8c 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.txt @@ -16,6 +16,9 @@ FILE /delegatedMembers.kt $this: VALUE_PARAMETER VALUE_PARAMETER value-parameter t: T VALUE_PARAMETER value-parameter x: X + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Test TYPE_PARAMETER CONSTRUCTOR public constructor Test(impl: IBase) @@ -55,3 +58,6 @@ FILE /delegatedMembers.kt CALL '(): Int' type=kotlin.Int origin=null $this: GET_FIELD '`Test$IBase$delegate`: IBase' type=IBase origin=null receiver: GET_VAR '' type=Test origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/fun.txt b/compiler/testData/ir/irText/declarations/parameters/fun.txt index 5404345f27e..74f942bf7e0 100644 --- a/compiler/testData/ir/irText/declarations/parameters/fun.txt +++ b/compiler/testData/ir/irText/declarations/parameters/fun.txt @@ -38,3 +38,6 @@ FILE /fun.kt VALUE_PARAMETER value-parameter i: kotlin.Int VALUE_PARAMETER value-parameter j: T BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/parameters/propertyAccessors.txt b/compiler/testData/ir/irText/declarations/parameters/propertyAccessors.txt index 9150ad1d94c..2276ac20587 100644 --- a/compiler/testData/ir/irText/declarations/parameters/propertyAccessors.txt +++ b/compiler/testData/ir/irText/declarations/parameters/propertyAccessors.txt @@ -105,3 +105,6 @@ FILE /propertyAccessors.kt $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter value: kotlin.Int BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt b/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt index 40f186e5d47..d21359e505c 100644 --- a/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt +++ b/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt @@ -17,3 +17,6 @@ FILE /primaryCtorDefaultArguments.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'x: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=Test origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt b/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt index cb9fe2251a0..5b697dfdca9 100644 --- a/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt +++ b/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt @@ -33,3 +33,6 @@ FILE /primaryCtorProperties.kt SET_FIELD 'test2: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=C origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt index 82b621aacff..f7c3e6a8580 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt @@ -15,6 +15,9 @@ FILE /differentReceivers.kt RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'value: String' type=kotlin.String origin=null receiver: GET_VAR '' type=MyClass origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public operator fun MyClass.provideDelegate(host: kotlin.Any?, p: kotlin.Any): kotlin.String $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter host: kotlin.Any? diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt index d1abfe857e4..c240ddf9c4d 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt @@ -23,6 +23,9 @@ FILE /local.kt RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String' CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=Delegate origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS DelegateProvider CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String) VALUE_PARAMETER value-parameter value: kotlin.String @@ -48,6 +51,9 @@ FILE /local.kt CALL 'constructor Delegate(String)' type=Delegate origin=null value: CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=DelegateProvider origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun foo(): kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY val testMember: kotlin.String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt index 6145c61b10a..da8994c6545 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt @@ -15,6 +15,9 @@ FILE /localDifferentReceivers.kt RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'value: String' type=kotlin.String origin=null receiver: GET_VAR '' type=MyClass origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public operator fun MyClass.provideDelegate(host: kotlin.Any?, p: kotlin.Any): kotlin.String $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter host: kotlin.Any? diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt index 9e15dafe257..5adcd41e40e 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt @@ -23,6 +23,9 @@ FILE /member.kt RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String' CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=Delegate origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS DelegateProvider CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String) VALUE_PARAMETER value-parameter value: kotlin.String @@ -48,6 +51,9 @@ FILE /member.kt CALL 'constructor Delegate(String)' type=Delegate origin=null value: CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=DelegateProvider origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS Host CONSTRUCTOR public constructor Host() BLOCK_BODY @@ -70,3 +76,6 @@ FILE /member.kt receiver: GET_VAR '' type=Host origin=null thisRef: GET_VAR '' type=Host origin=null property: CALLABLE_REFERENCE 'testMember: String' type=kotlin.reflect.KProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt index f8a7cf94266..1ac80087297 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt @@ -30,6 +30,9 @@ FILE /memberExtension.kt $this: GET_VAR 'value-parameter receiver: String' type=kotlin.String origin=null other: CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=Host.StringDelegate origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public final operator fun kotlin.String.provideDelegate(host: kotlin.Any?, p: kotlin.Any): Host.StringDelegate $this: VALUE_PARAMETER $receiver: VALUE_PARAMETER @@ -69,3 +72,6 @@ FILE /memberExtension.kt RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'ok: String' type=kotlin.String origin=null receiver: GET_VAR '' type=Host origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt index 8beb2e14e79..2f95d806f77 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt @@ -23,6 +23,9 @@ FILE /topLevel.kt RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String' CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=Delegate origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS DelegateProvider CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String) VALUE_PARAMETER value-parameter value: kotlin.String @@ -48,6 +51,9 @@ FILE /topLevel.kt CALL 'constructor Delegate(String)' type=Delegate origin=null value: CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR '' type=DelegateProvider origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public val testTopLevel: kotlin.String FIELD DELEGATE val `testTopLevel$delegate`: Delegate EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/typeAlias.txt b/compiler/testData/ir/irText/declarations/typeAlias.txt index 9bc114fd2e9..8a1a38c1497 100644 --- a/compiler/testData/ir/irText/declarations/typeAlias.txt +++ b/compiler/testData/ir/irText/declarations/typeAlias.txt @@ -9,3 +9,6 @@ FILE /typeAlias.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' TYPEALIAS typealias TestNested = String type=kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.txt b/compiler/testData/ir/irText/errors/suppressedNonPublicCall.txt index b904d1eed06..8635bbac61a 100644 --- a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.txt +++ b/compiler/testData/ir/irText/errors/suppressedNonPublicCall.txt @@ -7,6 +7,9 @@ FILE /suppressedNonPublicCall.kt FUN internal final fun bar(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public inline fun C.foo(): kotlin.Unit $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt index 76039929072..b5809d63fae 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt @@ -27,6 +27,9 @@ FILE /arrayAugmentedAssignment1.kt RETURN type=kotlin.Nothing from='(): IntArray' GET_FIELD 'x: IntArray' type=kotlin.IntArray origin=null receiver: GET_VAR '' type=C origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun testVariable(): kotlin.Unit BLOCK_BODY VAR var x: kotlin.IntArray diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt index df279a5e941..42ba0e69b61 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt @@ -3,12 +3,18 @@ FILE /arrayAugmentedAssignment2.kt FUN public abstract operator fun get(index: kotlin.String): kotlin.Int $this: VALUE_PARAMETER VALUE_PARAMETER value-parameter index: kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IB FUN public abstract operator fun IA.set(index: kotlin.String, value: kotlin.Int): kotlin.Unit $this: VALUE_PARAMETER $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter index: kotlin.String VALUE_PARAMETER value-parameter value: kotlin.Int + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun IB.test(a: IA): kotlin.Unit $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter a: IA diff --git a/compiler/testData/ir/irText/expressions/assignments.txt b/compiler/testData/ir/irText/expressions/assignments.txt index 0924e8c5501..6667e517853 100644 --- a/compiler/testData/ir/irText/expressions/assignments.txt +++ b/compiler/testData/ir/irText/expressions/assignments.txt @@ -22,6 +22,9 @@ FILE /assignments.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=Ref origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test1(): kotlin.Unit BLOCK_BODY VAR var x: kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt index 38dccd17831..db41c39a582 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt @@ -4,6 +4,9 @@ FILE /augmentedAssignment2.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public operator fun A.plusAssign(s: kotlin.String): kotlin.Unit $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter s: kotlin.String diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt index d9cbb532eb4..4b34f8d6e7f 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.txt @@ -14,6 +14,9 @@ FILE /augmentedAssignmentWithExpression.kt CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR '' type=Host origin=null x: CONST Int type=kotlin.Int value='1' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun foo(): Host BLOCK_BODY RETURN type=kotlin.Nothing from='foo(): Host' diff --git a/compiler/testData/ir/irText/expressions/boundCallableReferences.txt b/compiler/testData/ir/irText/expressions/boundCallableReferences.txt index 715a775170f..1bc231026ff 100644 --- a/compiler/testData/ir/irText/expressions/boundCallableReferences.txt +++ b/compiler/testData/ir/irText/expressions/boundCallableReferences.txt @@ -17,6 +17,9 @@ FILE /boundCallableReferences.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'bar: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=A origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun A.qux(): kotlin.Unit $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt index 2b6b5e55df6..e03968605bb 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt @@ -14,6 +14,9 @@ FILE /chainOfSafeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='bar(): C?' GET_VAR '' type=C origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test(nc: C?): C? VALUE_PARAMETER value-parameter nc: C? BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/classReference.txt b/compiler/testData/ir/irText/expressions/classReference.txt index 35f960cd982..fb421409ec1 100644 --- a/compiler/testData/ir/irText/expressions/classReference.txt +++ b/compiler/testData/ir/irText/expressions/classReference.txt @@ -4,6 +4,9 @@ FILE /classReference.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test(): kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt index 67e236019a4..ee6009b46a8 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt @@ -65,6 +65,15 @@ FILE /complexAugmentedAssignment.kt SET_FIELD 'x3: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=X1.X2.X3 origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test1(a: kotlin.IntArray): kotlin.Unit VALUE_PARAMETER value-parameter a: kotlin.IntArray BLOCK_BODY @@ -158,6 +167,9 @@ FILE /complexAugmentedAssignment.kt SET_FIELD 's: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=B origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT Host CONSTRUCTOR private constructor Host() BLOCK_BODY @@ -178,6 +190,9 @@ FILE /complexAugmentedAssignment.kt $this: GET_VAR 'tmp0_this: B' type=B origin=null other: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'value-parameter b: B' type=B origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun Host.test3(v: B): kotlin.Unit $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter v: B diff --git a/compiler/testData/ir/irText/expressions/contructorCall.txt b/compiler/testData/ir/irText/expressions/contructorCall.txt index 059b6696cc2..954e3c6d845 100644 --- a/compiler/testData/ir/irText/expressions/contructorCall.txt +++ b/compiler/testData/ir/irText/expressions/contructorCall.txt @@ -4,6 +4,9 @@ FILE /contructorCall.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public val test: A FIELD PROPERTY_BACKING_FIELD public val test: A EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/conventionComparisons.txt b/compiler/testData/ir/irText/expressions/conventionComparisons.txt index c25016cbcd5..691595eb624 100644 --- a/compiler/testData/ir/irText/expressions/conventionComparisons.txt +++ b/compiler/testData/ir/irText/expressions/conventionComparisons.txt @@ -1,10 +1,16 @@ FILE /conventionComparisons.kt CLASS INTERFACE IA + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IB FUN public abstract operator fun IA.compareTo(other: IA): kotlin.Int $this: VALUE_PARAMETER $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter other: IA + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun IB.test1(a1: IA, a2: IA): kotlin.Boolean $receiver: VALUE_PARAMETER VALUE_PARAMETER value-parameter a1: IA diff --git a/compiler/testData/ir/irText/expressions/destructuring1.txt b/compiler/testData/ir/irText/expressions/destructuring1.txt index 30919374b96..cd1fc57942a 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.txt @@ -4,6 +4,9 @@ FILE /destructuring1.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT B CONSTRUCTOR private constructor B() BLOCK_BODY @@ -21,6 +24,9 @@ FILE /destructuring1.kt BLOCK_BODY RETURN type=kotlin.Nothing from='component2() on A: Int' CONST Int type=kotlin.Int value='2' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun B.test(): kotlin.Unit $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.txt b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.txt index 76bdbe6ae0c..e003c78e26f 100644 --- a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.txt +++ b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.txt @@ -4,6 +4,9 @@ FILE /destructuringWithUnderscore.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT B CONSTRUCTOR private constructor B() BLOCK_BODY @@ -27,6 +30,9 @@ FILE /destructuringWithUnderscore.kt BLOCK_BODY RETURN type=kotlin.Nothing from='component3() on A: Int' CONST Int type=kotlin.Int value='3' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun B.test(): kotlin.Unit $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt index ba59479ec68..3dc9f9aa42a 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt @@ -4,6 +4,9 @@ FILE /forWithImplicitReceivers.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='FiveTimes' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS CLASS IntCell CONSTRUCTOR public constructor IntCell(value: kotlin.Int) VALUE_PARAMETER value-parameter value: kotlin.Int @@ -27,6 +30,9 @@ FILE /forWithImplicitReceivers.kt SET_FIELD 'value: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=IntCell origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IReceiver FUN public open operator fun FiveTimes.iterator(): IntCell $this: VALUE_PARAMETER @@ -62,6 +68,9 @@ FILE /forWithImplicitReceivers.kt : CALL 'dec(): Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'tmp1: Int' type=kotlin.Int origin=null GET_VAR 'tmp1: Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun IReceiver.test(): kotlin.Unit $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt index e066fbfe0cf..6fef6efc9b4 100644 --- a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt @@ -22,3 +22,7 @@ FILE /Derived.kt SET_FIELD 'value: Int' type=kotlin.Unit origin=EQ receiver: GET_VAR '' type=Derived origin=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null + PROPERTY FAKE_OVERRIDE public final override var value: kotlin.Int + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt index cd71df883f1..7ea34c12c73 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt @@ -50,3 +50,6 @@ FILE /jvmStaticFieldReference.kt $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='TestClass/init' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/expressions/membersImportedFromObject.txt b/compiler/testData/ir/irText/expressions/membersImportedFromObject.txt index 8f37c291d39..c5efb795c9c 100644 --- a/compiler/testData/ir/irText/expressions/membersImportedFromObject.txt +++ b/compiler/testData/ir/irText/expressions/membersImportedFromObject.txt @@ -32,6 +32,9 @@ FILE /membersImportedFromObject.kt BLOCK_BODY RETURN type=kotlin.Nothing from='() on Int: Int' CONST Int type=kotlin.Int value='43' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public val test1: kotlin.Int FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Int EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.txt index 3db13ccf9f9..e8856ec380b 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.txt @@ -4,6 +4,9 @@ FILE /objectAsCallable.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS ENUM_CLASS En CONSTRUCTOR private constructor En() BLOCK_BODY @@ -11,6 +14,17 @@ FILE /objectAsCallable.kt INSTANCE_INITIALIZER_CALL classDescriptor='En' ENUM_ENTRY enum entry X init: ENUM_CONSTRUCTOR_CALL 'constructor En()' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: En): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): En diff --git a/compiler/testData/ir/irText/expressions/objectClassReference.txt b/compiler/testData/ir/irText/expressions/objectClassReference.txt index f4ff0f9fbff..2fa0b2b76da 100644 --- a/compiler/testData/ir/irText/expressions/objectClassReference.txt +++ b/compiler/testData/ir/irText/expressions/objectClassReference.txt @@ -4,6 +4,9 @@ FILE /objectClassReference.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test(): kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt index f905f0b33ec..552965f1ceb 100644 --- a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt +++ b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt @@ -102,3 +102,6 @@ FILE /primitivesImplicitConversions.kt RETURN type=kotlin.Nothing from='(): Long' GET_FIELD 'x: Long' type=kotlin.Long origin=null receiver: GET_VAR '' type=TestImplicitArguments origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt index b1195750a05..bee45099bde 100644 --- a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt +++ b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt @@ -7,6 +7,9 @@ FILE /reflectionLiterals.kt FUN public final fun foo(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun bar(): kotlin.Unit BLOCK_BODY PROPERTY public val qux: kotlin.Int = 42 diff --git a/compiler/testData/ir/irText/expressions/safeAssignment.txt b/compiler/testData/ir/irText/expressions/safeAssignment.txt index 6a22c7c7477..8f5433fb889 100644 --- a/compiler/testData/ir/irText/expressions/safeAssignment.txt +++ b/compiler/testData/ir/irText/expressions/safeAssignment.txt @@ -22,6 +22,9 @@ FILE /safeAssignment.kt SET_FIELD 'x: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=C origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test(nc: C?): kotlin.Unit VALUE_PARAMETER value-parameter nc: C? BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt index f06d2feaa76..07d61e9ee62 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt @@ -4,6 +4,9 @@ FILE /safeCallWithIncrementDecrement.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public var test.C?.p: kotlin.Int FUN public fun test.C?.(): kotlin.Int $receiver: VALUE_PARAMETER diff --git a/compiler/testData/ir/irText/expressions/safeCalls.txt b/compiler/testData/ir/irText/expressions/safeCalls.txt index 4d8d1f55f02..0a3ade7cf52 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.txt @@ -22,6 +22,9 @@ FILE /safeCalls.kt SET_FIELD 'value: Int' type=kotlin.Unit origin=null receiver: GET_VAR '' type=Ref origin=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IHost FUN public open fun kotlin.String.extLength(): kotlin.Int $this: VALUE_PARAMETER @@ -30,6 +33,9 @@ FILE /safeCalls.kt RETURN type=kotlin.Nothing from='extLength() on String: Int' CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR '' type=kotlin.String origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test1(x: kotlin.String?): kotlin.Int? VALUE_PARAMETER value-parameter x: kotlin.String? BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt index d2c021e74c8..cf7e0f7c217 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt @@ -17,3 +17,7 @@ FILE /Derived.kt receiver: GET_VAR '' type=Derived origin=null value: TYPE_OP type=kotlin.String! origin=IMPLICIT_CAST typeOperand=kotlin.String! GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null + PROPERTY FAKE_OVERRIDE public final override var value: kotlin.String! + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt index ae26f3cef71..bdc84347962 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt @@ -1,6 +1,12 @@ FILE /smartCastsWithDestructuring.kt CLASS INTERFACE I1 + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE I2 + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public operator fun I1.component1(): kotlin.Int $receiver: VALUE_PARAMETER BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/typeOperators.txt b/compiler/testData/ir/irText/expressions/typeOperators.txt index 53ab9a2de17..ee60b9d71f6 100644 --- a/compiler/testData/ir/irText/expressions/typeOperators.txt +++ b/compiler/testData/ir/irText/expressions/typeOperators.txt @@ -1,5 +1,8 @@ FILE /typeOperators.kt CLASS INTERFACE IThing + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test1(x: kotlin.Any): kotlin.Boolean VALUE_PARAMETER value-parameter x: kotlin.Any BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/values.txt b/compiler/testData/ir/irText/expressions/values.txt index cd7d7a4dcb5..3861173415f 100644 --- a/compiler/testData/ir/irText/expressions/values.txt +++ b/compiler/testData/ir/irText/expressions/values.txt @@ -6,6 +6,17 @@ FILE /values.kt INSTANCE_INITIALIZER_CALL classDescriptor='Enum' ENUM_ENTRY enum entry A init: ENUM_CONSTRUCTOR_CALL 'constructor Enum()' + FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any + FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class! + FUN FAKE_OVERRIDE public final override fun compareTo(other: Enum): kotlin.Int + FUN FAKE_OVERRIDE public final override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public final override fun hashCode(): kotlin.Int + PROPERTY FAKE_OVERRIDE public final override val name: kotlin.String + FUN FAKE_OVERRIDE public final override fun (): kotlin.String + PROPERTY FAKE_OVERRIDE public final override val ordinal: kotlin.Int + FUN FAKE_OVERRIDE public final override fun (): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Enum @@ -15,6 +26,9 @@ FILE /values.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String PROPERTY public val a: kotlin.Int = 0 FIELD PROPERTY_BACKING_FIELD public val a: kotlin.Int = 0 EXPRESSION_BODY @@ -33,6 +47,12 @@ FILE /values.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Z' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test1(): Enum BLOCK_BODY RETURN type=kotlin.Nothing from='test1(): Enum' diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index f0b3dacf78b..9bfb1cb4373 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -4,6 +4,9 @@ FILE /when.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun testWithSubject(x: kotlin.Any?): kotlin.String VALUE_PARAMETER value-parameter x: kotlin.Any? BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 3afaa179d7f..3b445662b76 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -4,11 +4,17 @@ FILE /multipleImplicitReceivers.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS OBJECT B CONSTRUCTOR private constructor B() BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='B' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IFoo PROPERTY public open val A.foo: B FUN public open fun A.(): B @@ -17,6 +23,9 @@ FILE /multipleImplicitReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='() on A: B' GET_OBJECT 'B' type=B + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String CLASS INTERFACE IInvoke FUN public open operator fun B.invoke(): kotlin.Int $this: VALUE_PARAMETER @@ -24,6 +33,9 @@ FILE /multipleImplicitReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='invoke() on B: Int' CONST Int type=kotlin.Int value='42' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun test(fooImpl: IFoo, invokeImpl: IInvoke): kotlin.Unit VALUE_PARAMETER value-parameter fooImpl: IFoo VALUE_PARAMETER value-parameter invokeImpl: IInvoke diff --git a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt index ce8e8107a62..e69acee1a58 100644 --- a/compiler/testData/ir/irText/regressions/integerCoercionToT.txt +++ b/compiler/testData/ir/irText/regressions/integerCoercionToT.txt @@ -1,5 +1,8 @@ FILE /integerCoercionToT.kt CLASS INTERFACE CPointed + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public inline fun CPointed.reinterpret(): T TYPE_PARAMETER $receiver: VALUE_PARAMETER @@ -13,6 +16,9 @@ FILE /integerCoercionToT.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='CInt32VarX' + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String TYPEALIAS typealias CInt32Var = CInt32VarX type=CInt32VarX PROPERTY public var CInt32VarX.value: T_INT FUN public fun CInt32VarX.(): T_INT @@ -40,6 +46,9 @@ FILE /integerCoercionToT.kt RETURN type=kotlin.Nothing from='(): Int' GET_FIELD 'value: Int' type=kotlin.Int origin=null receiver: GET_VAR '' type=IdType origin=null + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String FUN public fun foo(value: IdType, cv: CInt32Var /* = CInt32VarX */): kotlin.Unit VALUE_PARAMETER value-parameter value: IdType VALUE_PARAMETER value-parameter cv: CInt32Var /* = CInt32VarX */ diff --git a/compiler/testData/ir/irText/singletons/companion.txt b/compiler/testData/ir/irText/singletons/companion.txt index dad68b0f2a6..8542efbf6de 100644 --- a/compiler/testData/ir/irText/singletons/companion.txt +++ b/compiler/testData/ir/irText/singletons/companion.txt @@ -17,3 +17,9 @@ FILE /companion.kt FUN public final fun test(): kotlin.Unit $this: VALUE_PARAMETER BLOCK_BODY + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/singletons/object.txt b/compiler/testData/ir/irText/singletons/object.txt index 905e720d162..07135d348c6 100644 --- a/compiler/testData/ir/irText/singletons/object.txt +++ b/compiler/testData/ir/irText/singletons/object.txt @@ -17,3 +17,9 @@ FILE /object.kt BLOCK_BODY CALL 'test(): Unit' type=kotlin.Unit origin=null $this: GET_OBJECT 'Z' type=Z + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 2314990f9a9..7e9969f2579 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -239,6 +239,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { doTest(fileName); } + @TestMetadata("fakeOverrides.kt") + public void testFakeOverrides() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/fakeOverrides.kt"); + doTest(fileName); + } + @TestMetadata("fileWithAnnotations.kt") public void testFileWithAnnotations() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/fileWithAnnotations.kt");