diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index a4754e51728..071b2231ed8 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -283,6 +283,7 @@ internal tailrec fun FirCallableSymbol<*>.deepestOverriddenSymbol(): FirCallable } internal tailrec fun FirCallableSymbol<*>.deepestMatchingOverriddenSymbol(root: FirCallableSymbol<*> = this): FirCallableSymbol<*> { + if (isIntersectionOverride) return this val overriddenSymbol = overriddenSymbol?.takeIf { it.callableId == root.callableId } ?: return this return overriddenSymbol.deepestMatchingOverriddenSymbol(this) } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt index 100d6730e58..2a2c9ee4956 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt @@ -106,9 +106,9 @@ class Fir2IrConverter( } // Add delegated members *before* fake override generations. // Otherwise, fake overrides for delegated members, which are redundant, will be added. - processedCallableNames += delegatedMemberNames(irClass) + val realDeclarations = delegatedMembers(irClass) + anonymousObject.declarations with(fakeOverrideGenerator) { - irClass.addFakeOverrides(anonymousObject, processedCallableNames) + irClass.addFakeOverrides(anonymousObject, realDeclarations) } return irClass @@ -124,47 +124,39 @@ class Fir2IrConverter( if (irConstructor != null) { irClass.declarations += irConstructor } - val processedCallableNames = mutableSetOf() + val allDeclarations = regularClass.declarations.toMutableList() for (declaration in sortBySynthetic(regularClass.declarations)) { val irDeclaration = processMemberDeclaration(declaration, regularClass, irClass) ?: continue - when (declaration) { - is FirSimpleFunction -> processedCallableNames += declaration.name - is FirProperty -> processedCallableNames += declaration.name - } irClass.declarations += irDeclaration } // Add delegated members *before* fake override generations. // Otherwise, fake overrides for delegated members, which are redundant, will be added. - processedCallableNames += delegatedMemberNames(irClass) + allDeclarations += delegatedMembers(irClass) // Add synthetic members *before* fake override generations. // Otherwise, redundant members, e.g., synthetic toString _and_ fake override toString, will be added. if (irConstructor != null && (irClass.isInline || irClass.isData)) { declarationStorage.enterScope(irConstructor) val dataClassMembersGenerator = DataClassMembersGenerator(components) if (irClass.isInline) { - processedCallableNames += dataClassMembersGenerator.generateInlineClassMembers(regularClass, irClass) + allDeclarations += dataClassMembersGenerator.generateInlineClassMembers(regularClass, irClass) } if (irClass.isData) { - processedCallableNames += dataClassMembersGenerator.generateDataClassMembers(regularClass, irClass) + allDeclarations += dataClassMembersGenerator.generateDataClassMembers(regularClass, irClass) } declarationStorage.leaveScope(irConstructor) } with(fakeOverrideGenerator) { - irClass.addFakeOverrides(regularClass, processedCallableNames) + irClass.addFakeOverrides(regularClass, allDeclarations) } return irClass } - private fun delegatedMemberNames(irClass: IrClass): List { + private fun delegatedMembers(irClass: IrClass): List { return irClass.declarations.filter { it.origin == IrDeclarationOrigin.DELEGATED_MEMBER }.mapNotNull { - when (it) { - is IrSimpleFunction -> it.name - is IrProperty -> it.name - else -> null - } + components.declarationStorage.originalDeclarationForDelegated(it) } } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt index b117a78c317..1ff867fdb30 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/DataClassMembersGenerator.kt @@ -7,11 +7,15 @@ package org.jetbrains.kotlin.fir.backend.generators import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.Visibilities -import org.jetbrains.kotlin.fir.backend.* +import org.jetbrains.kotlin.fir.backend.Fir2IrComponents +import org.jetbrains.kotlin.fir.backend.FirMetadataSource +import org.jetbrains.kotlin.fir.backend.declareThisReceiverParameter +import org.jetbrains.kotlin.fir.backend.toIrType import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl +import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope import org.jetbrains.kotlin.fir.symbols.CallableId import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol @@ -44,10 +48,10 @@ import org.jetbrains.kotlin.descriptors.DescriptorVisibilities @OptIn(ObsoleteDescriptorBasedAPI::class) class DataClassMembersGenerator(val components: Fir2IrComponents) { - fun generateInlineClassMembers(klass: FirClass<*>, irClass: IrClass): List = + fun generateInlineClassMembers(klass: FirClass<*>, irClass: IrClass): List = MyDataClassMethodsGenerator(irClass, klass.symbol.classId, IrDeclarationOrigin.GENERATED_INLINE_CLASS_MEMBER).generate(klass) - fun generateDataClassMembers(klass: FirClass<*>, irClass: IrClass): List = + fun generateDataClassMembers(klass: FirClass<*>, irClass: IrClass): List = MyDataClassMethodsGenerator(irClass, klass.symbol.classId, IrDeclarationOrigin.GENERATED_DATA_CLASS_MEMBER).generate(klass) fun generateDataClassComponentBody(irFunction: IrFunction, classId: ClassId) = @@ -120,7 +124,7 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { (this.name == hashCodeName && matchesHashCodeSignature) || (this.name == toStringName && matchesToStringSignature) - fun generate(klass: FirClass<*>): List { + fun generate(klass: FirClass<*>): List { val propertyParametersCount = irClass.primaryConstructor?.explicitParameters?.size ?: 0 val properties = irClass.declarations .filterIsInstance() @@ -130,7 +134,7 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { return emptyList() } - val result = mutableListOf() + val result = mutableListOf() val contributedFunctionsInThisType = klass.declarations.mapNotNull { if (it is FirSimpleFunction && it.matchesDataClassSyntheticMemberSignatures) { @@ -138,22 +142,30 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { } else null } - val nonOverridableContributedFunctionsInSupertypes = - klass.collectContributedFunctionsFromSupertypes(components.session) { declaration, map -> - if (declaration is FirSimpleFunction && - declaration.body != null && - !Visibilities.isPrivate(declaration.visibility) && - declaration.modality == Modality.FINAL && - declaration.matchesDataClassSyntheticMemberSignatures - ) { - map.putIfAbsent(declaration.name, declaration) + val contributedFunctionsInSupertypes = + @OptIn(ExperimentalStdlibApi::class) + buildMap { + for (name in listOf(equalsName, hashCodeName, toStringName)) { + klass.unsubstitutedScope(components.session, components.scopeSession).processFunctionsByName(name) { + val declaration = it.fir + if (declaration is FirSimpleFunction && + declaration.matchesDataClassSyntheticMemberSignatures + ) { + putIfAbsent(declaration.name, declaration) + } + } } } + fun isOverridableDeclaration(name: Name): Boolean { + val declaration = contributedFunctionsInSupertypes[name] ?: return false + return declaration.modality != Modality.FINAL + } + if (!contributedFunctionsInThisType.contains(equalsName) && - !nonOverridableContributedFunctionsInSupertypes.containsKey(equalsName) + isOverridableDeclaration(equalsName) ) { - result.add(equalsName) + result.add(contributedFunctionsInSupertypes.getValue(equalsName)) val equalsFunction = createSyntheticIrFunction( equalsName, components.irBuiltIns.booleanType, @@ -164,9 +176,9 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { } if (!contributedFunctionsInThisType.contains(hashCodeName) && - !nonOverridableContributedFunctionsInSupertypes.containsKey(hashCodeName) + isOverridableDeclaration(hashCodeName) ) { - result.add(hashCodeName) + result.add(contributedFunctionsInSupertypes.getValue(hashCodeName)) val hashCodeFunction = createSyntheticIrFunction( hashCodeName, components.irBuiltIns.intType, @@ -176,9 +188,9 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) { } if (!contributedFunctionsInThisType.contains(toStringName) && - !nonOverridableContributedFunctionsInSupertypes.containsKey(toStringName) + isOverridableDeclaration(toStringName) ) { - result.add(toStringName) + result.add(contributedFunctionsInSupertypes.getValue(toStringName)) val toStringFunction = createSyntheticIrFunction( toStringName, components.irBuiltIns.stringType, diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt index 8ce7a9fae60..9c1e3c49e1f 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/FakeOverrideGenerator.kt @@ -6,11 +6,16 @@ package org.jetbrains.kotlin.fir.backend.generators import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.FirSymbolOwner import org.jetbrains.kotlin.fir.backend.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.ScopeSession +import org.jetbrains.kotlin.fir.scopes.FirTypeScope +import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenFunctions +import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenProperties import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope +import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.PossiblyFirFakeOverrideSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol @@ -23,7 +28,7 @@ import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrTypeProjection import org.jetbrains.kotlin.load.java.JavaDescriptorVisibilities -import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.ClassId class FakeOverrideGenerator( private val session: FirSession, @@ -33,8 +38,8 @@ class FakeOverrideGenerator( private val conversionScope: Fir2IrConversionScope ) { - private val baseFunctionSymbols = mutableMapOf() - private val basePropertySymbols = mutableMapOf() + private val baseFunctionSymbols = mutableMapOf>() + private val basePropertySymbols = mutableMapOf>() private fun IrSimpleFunction.withFunction(f: IrSimpleFunction.() -> Unit): IrSimpleFunction { return conversionScope.withFunction(this, f) @@ -58,17 +63,19 @@ class FakeOverrideGenerator( } } - fun IrClass.addFakeOverrides(klass: FirClass<*>, processedCallableNames: MutableSet) { - declarations += getFakeOverrides(klass, processedCallableNames) + fun IrClass.addFakeOverrides(klass: FirClass<*>, declarations: Collection) { + this.declarations += getFakeOverrides( + klass, + declarations + ) } - fun IrClass.getFakeOverrides(klass: FirClass<*>, processedCallableNames: MutableSet): List { + fun IrClass.getFakeOverrides(klass: FirClass<*>, realDeclarations: Collection): List { val result = mutableListOf() - val superTypesCallableNames = klass.collectCallableNamesFromSupertypes(session) val useSiteMemberScope = klass.unsubstitutedScope(session, scopeSession) + val superTypesCallableNames = useSiteMemberScope.getCallableNames() + val realDeclarationSymbols = realDeclarations.filterIsInstance>().mapTo(mutableSetOf(), FirSymbolOwner<*>::symbol) for (name in superTypesCallableNames) { - if (name in processedCallableNames) continue - processedCallableNames += name val isLocal = klass !is FirRegularClass || klass.isLocal useSiteMemberScope.processFunctionsByName(name) { functionSymbol -> createFakeOverriddenIfNeeded( @@ -86,7 +93,10 @@ class FakeOverrideGenerator( result, containsErrorTypes = { irFunction -> irFunction.returnType.containsErrorType() || irFunction.valueParameters.any { it.type.containsErrorType() } - } + }, + realDeclarationSymbols, + FirTypeScope::getDirectOverriddenFunctions, + useSiteMemberScope, ) } @@ -107,7 +117,10 @@ class FakeOverrideGenerator( containsErrorTypes = { irProperty -> irProperty.backingField?.type?.containsErrorType() == true || irProperty.getter?.returnType?.containsErrorType() == true - } + }, + realDeclarationSymbols, + FirTypeScope::getDirectOverriddenProperties, + useSiteMemberScope, ) } } @@ -122,15 +135,22 @@ class FakeOverrideGenerator( cachedIrDeclaration: (D) -> I?, createIrDeclaration: (D, irParent: IrClass, thisReceiverOwner: IrClass?, origin: IrDeclarationOrigin, isLocal: Boolean) -> I, createFakeOverrideSymbol: (D, S) -> S, - baseSymbols: MutableMap, + baseSymbols: MutableMap>, result: MutableList, - containsErrorTypes: (I) -> Boolean + containsErrorTypes: (I) -> Boolean, + realDeclarationSymbols: Set>, + computeDirectOverridden: FirTypeScope.(S) -> List, + scope: FirTypeScope, ) where S : FirCallableSymbol, S : PossiblyFirFakeOverrideSymbol { - if (originalSymbol !is S) return + if (originalSymbol !is S || originalSymbol in realDeclarationSymbols) return + val originalDeclaration = originalSymbol.fir val origin = IrDeclarationOrigin.FAKE_OVERRIDE val baseSymbol = originalSymbol.deepestOverriddenSymbol() as S - if (originalSymbol.isFakeOverride && originalSymbol.callableId.classId == klass.symbol.classId) { + val classId = klass.symbol.classId + if ((originalSymbol.isFakeOverride || originalSymbol.isIntersectionOverride) && + originalSymbol.callableId.classId == classId + ) { // Substitution case // NB: see comment above about substituted function' parent val irDeclaration = cachedIrDeclaration(originalDeclaration)?.takeIf { it.parent == irClass } @@ -141,7 +161,7 @@ class FakeOverrideGenerator( isLocal ) irDeclaration.parent = irClass - baseSymbols[irDeclaration] = baseSymbol + baseSymbols[irDeclaration] = computeBaseSymbols(originalSymbol, baseSymbol, computeDirectOverridden, scope, classId) result += irDeclaration } else if (originalDeclaration.allowsToHaveFakeOverrideIn(klass)) { // Trivial fake override case @@ -160,58 +180,77 @@ class FakeOverrideGenerator( return } irDeclaration.parent = irClass - baseSymbols[irDeclaration] = baseSymbol + baseSymbols[irDeclaration] = computeBaseSymbols(originalSymbol, baseSymbol, computeDirectOverridden, scope, classId) result += irDeclaration } } + private inline fun > computeBaseSymbols( + symbol: S, + basedSymbol: S, + directOverridden: FirTypeScope.(S) -> List, + scope: FirTypeScope, + containingClassId: ClassId, + ): List { + if (!symbol.isIntersectionOverride) return listOf(basedSymbol) + return scope.directOverridden(symbol).map { + @Suppress("UNCHECKED_CAST") + if (it is PossiblyFirFakeOverrideSymbol<*, *> && it.isFakeOverride && it.callableId.classId == containingClassId) + it.overriddenSymbol!! as S + else + it + } + } fun bindOverriddenSymbols(declarations: List) { for (declaration in declarations) { if (declaration.origin != IrDeclarationOrigin.FAKE_OVERRIDE) continue when (declaration) { is IrSimpleFunction -> { - val baseSymbol = baseFunctionSymbols[declaration]!! - val overriddenSymbol = declarationStorage.getIrFunctionSymbol(baseSymbol) as IrSimpleFunctionSymbol + val baseSymbols = + baseFunctionSymbols[declaration]!!.map { declarationStorage.getIrFunctionSymbol(it) as IrSimpleFunctionSymbol } declaration.withFunction { - overriddenSymbols = listOf(overriddenSymbol) + overriddenSymbols = baseSymbols } } is IrProperty -> { - val baseSymbol = basePropertySymbols[declaration]!! + val baseSymbols = basePropertySymbols[declaration]!! declaration.withProperty { - discardAccessorsAccordingToBaseVisibility(baseSymbol) - setOverriddenSymbolsForAccessors(declarationStorage, declaration.isVar, firOverriddenSymbol = baseSymbol) + discardAccessorsAccordingToBaseVisibility(baseSymbols) + setOverriddenSymbolsForAccessors(declarationStorage, declaration.isVar, baseSymbols) } } } } } - private fun IrProperty.discardAccessorsAccordingToBaseVisibility(baseSymbol: FirPropertySymbol) { - // Do not create fake overrides for accessors if not allowed to do so, e.g., private lateinit var. - if (baseSymbol.fir.getter?.allowsToHaveFakeOverride != true) { - getter = null - } - // or private setter - if (baseSymbol.fir.setter?.allowsToHaveFakeOverride != true) { - setter = null + private fun IrProperty.discardAccessorsAccordingToBaseVisibility(baseSymbols: List) { + for (baseSymbol in baseSymbols) { + // Do not create fake overrides for accessors if not allowed to do so, e.g., private lateinit var. + if (baseSymbol.fir.getter?.allowsToHaveFakeOverride != true) { + getter = null + } + // or private setter + if (baseSymbol.fir.setter?.allowsToHaveFakeOverride != true) { + setter = null + } } } private fun IrProperty.setOverriddenSymbolsForAccessors( declarationStorage: Fir2IrDeclarationStorage, isVar: Boolean, - firOverriddenSymbol: FirPropertySymbol + firOverriddenSymbols: List ): IrProperty { - val irSymbol = declarationStorage.getIrPropertySymbol(firOverriddenSymbol) as? IrPropertySymbol ?: return this - val overriddenProperty = irSymbol.owner + val overriddenIrProperties = firOverriddenSymbols.mapNotNull { + (declarationStorage.getIrPropertySymbol(it) as? IrPropertySymbol)?.owner + } getter?.apply { - overriddenProperty.getter?.symbol?.let { overriddenSymbols = listOf(it) } + overriddenSymbols = overriddenIrProperties.mapNotNull { it.getter?.symbol } } if (isVar) { setter?.apply { - overriddenProperty.setter?.symbol?.let { overriddenSymbols = listOf(it) } + overriddenSymbols = overriddenIrProperties.mapNotNull { it.setter?.symbol } } } return this diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt index ffbd698cc80..a66767db5ab 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt @@ -168,7 +168,7 @@ class Fir2IrLazyClass( } } with(fakeOverrideGenerator) { - val fakeOverrides = getFakeOverrides(fir, processedNames) + val fakeOverrides = getFakeOverrides(fir, fir.declarations) bindOverriddenSymbols(fakeOverrides) result += fakeOverrides } diff --git a/compiler/testData/ir/irText/classes/enum.fir.txt b/compiler/testData/ir/irText/classes/enum.fir.txt index df35e714895..129b2d237b9 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.txt @@ -148,10 +148,10 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestEnum3, other:.TestEnum3) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum3) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum3 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestEnum3 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -265,10 +265,10 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestEnum4, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestEnum4 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -337,10 +337,10 @@ FILE fqName: fileName:/enum.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestEnum4, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestEnum4 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt index 954bc160f03..24d6924a6bc 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt +++ b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt @@ -189,10 +189,10 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestOpenEnum1, other:.TestOpenEnum1) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestOpenEnum1) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestOpenEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestOpenEnum1 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -279,10 +279,10 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestOpenEnum2, other:.TestOpenEnum2) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestOpenEnum2) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestOpenEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestOpenEnum2 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -376,10 +376,10 @@ FILE fqName: fileName:/enumClassModality.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestAbstractEnum1, other:.TestAbstractEnum1) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestAbstractEnum1) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestAbstractEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestAbstractEnum1 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -485,27 +485,30 @@ FILE fqName: fileName:/enumClassModality.kt public abstract fun foo (): kotlin.Unit declared in .IFoo $this: VALUE_PARAMETER name: type:.TestAbstractEnum2.X1 BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any + public final fun hashCode (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestAbstractEnum2, other:.TestAbstractEnum2) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestAbstractEnum2) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestAbstractEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestAbstractEnum2 PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] @@ -528,18 +531,21 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public abstract fun foo (): kotlin.Unit declared in .IFoo $this: VALUE_PARAMETER name: type:.IFoo - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any + public final fun hashCode (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] overridden: diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt index d130ead8030..b47a5b26cad 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt @@ -52,10 +52,10 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.A, other:.A) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.A) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.A + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.A FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -149,7 +149,7 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'private constructor (arg: kotlin.String) declared in .A' - arg: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + arg: CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .A.' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.String): kotlin.Unit declared in .A' type=kotlin.Unit origin=EQ $this: GET_VAR ': .A declared in .A' type=.A origin=null @@ -159,15 +159,15 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun f (): kotlin.String declared in .A' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.A> diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt index 5014ffbdad5..0f4d83ac40e 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt @@ -178,10 +178,10 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.Test2, other:.Test2) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Test2) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.Test2 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -235,10 +235,10 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.Test2, other:.Test2) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Test2) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.Test2 FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt index abaa3936771..207e8867064 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt @@ -67,10 +67,10 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.TestEnum, other:.TestEnum) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.TestEnum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/fakeOverrides.fir.txt b/compiler/testData/ir/irText/declarations/fakeOverrides.fir.txt index ed0109fea13..2ccd40848ce 100644 --- a/compiler/testData/ir/irText/declarations/fakeOverrides.fir.txt +++ b/compiler/testData/ir/irText/declarations/fakeOverrides.fir.txt @@ -83,6 +83,7 @@ FILE fqName: fileName:/fakeOverrides.kt FUN FAKE_OVERRIDE name:foo visibility:public modality:FINAL <> ($this:.CFoo.CFoo>, x:kotlin.String) returnType:kotlin.Unit [fake_override] overridden: public final fun foo (x: T of .CFoo): kotlin.Unit declared in .CFoo + public abstract fun foo (x: kotlin.String): kotlin.Unit declared in .IFooStr $this: VALUE_PARAMETER name: type:.CFoo.CFoo> VALUE_PARAMETER name:x index:0 type:kotlin.String FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.fir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.fir.txt index e6b4616e257..68ad264bf1f 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.fir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/expectClassInherited.kt CONSTRUCTOR visibility:protected <> () returnType:.A [primary,expect] FUN name:foo visibility:public modality:ABSTRACT <> ($this:.A) returnType:kotlin.Unit [expect] $this: VALUE_PARAMETER name: type:.A - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any @@ -28,7 +28,7 @@ FILE fqName: fileName:/expectClassInherited.kt FUN name:bar visibility:public modality:OPEN <> ($this:.B, s:kotlin.String) returnType:kotlin.Unit [expect] $this: VALUE_PARAMETER name: type:.B VALUE_PARAMETER name:s index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt index 5e51982d0fa..f8a9cb56ddf 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt @@ -15,12 +15,12 @@ FILE fqName: fileName:/expectedEnumClass.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.MyEnum) returnType:kotlin.Int [expect,fake_override] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.MyEnum) returnType:kotlin.Int [expect,fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.MyEnum - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.fir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.fir.txt index 599f95d1b86..17cb0449919 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/expectedSealedClass.kt CLASS CLASS name:Ops modality:SEALED visibility:public [expect] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Ops CONSTRUCTOR visibility:private <> () returnType:.Ops [primary,expect] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any @@ -18,7 +18,7 @@ FILE fqName: fileName:/expectedSealedClass.kt CLASS CLASS name:Add modality:FINAL visibility:public [expect] superTypes:[.Ops] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Add CONSTRUCTOR visibility:public <> () returnType:.Add [primary,expect] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index fa2946013ce..68ace031716 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -124,7 +124,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null $this: GET_VAR 'var s: kotlin.String [var] declared in .testContinueDoWhile' type=kotlin.String origin=null other: STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null CONST String type=kotlin.String value=";" condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt index b5775692f61..a453560cc03 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt @@ -48,10 +48,10 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.X, other:.X) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.X) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.X + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.X FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt index e5baa3eb6ba..9fd5e2f0765 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt @@ -113,10 +113,10 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.MyEnum, other:.MyEnum) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.MyEnum) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.MyEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.MyEnum FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/equals.fir.txt b/compiler/testData/ir/irText/expressions/equals.fir.txt index 3685c376256..0d6adbd0703 100644 --- a/compiler/testData/ir/irText/expressions/equals.fir.txt +++ b/compiler/testData/ir/irText/expressions/equals.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/equals.kt VALUE_PARAMETER name:b index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testEquals (a: kotlin.Int, b: kotlin.Int): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null $this: GET_VAR 'a: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null other: GET_VAR 'b: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null FUN name:testJEqeqNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean @@ -24,6 +24,6 @@ FILE fqName: fileName:/equals.kt FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt index f55cf0a5762..f294256fc58 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1d (x: kotlin.Double, y: kotlin.Double): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test1d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double declared in .test1d' type=kotlin.Double origin=null FUN name:test2d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Double?) returnType:kotlin.Boolean @@ -12,7 +12,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2d (x: kotlin.Double, y: kotlin.Double?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test2d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double? declared in .test2d' type=kotlin.Double? origin=null FUN name:test3d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -20,7 +20,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3d (x: kotlin.Double, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test3d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Any origin=null FUN name:test4d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Number) returnType:kotlin.Boolean @@ -28,7 +28,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4d (x: kotlin.Double, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test4d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Number declared in .test4d' type=kotlin.Number origin=null FUN name:test5d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -40,7 +40,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null @@ -63,7 +63,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -76,7 +76,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1f (x: kotlin.Float, y: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test1f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float declared in .test1f' type=kotlin.Float origin=null FUN name:test2f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Float?) returnType:kotlin.Boolean @@ -84,7 +84,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2f (x: kotlin.Float, y: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test2f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float? declared in .test2f' type=kotlin.Float? origin=null FUN name:test3f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -92,7 +92,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3f (x: kotlin.Float, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test3f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Any origin=null FUN name:test4f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Number) returnType:kotlin.Boolean @@ -100,7 +100,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4f (x: kotlin.Float, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test4f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Number declared in .test4f' type=kotlin.Number origin=null FUN name:test5f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -112,7 +112,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null @@ -135,7 +135,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -159,7 +159,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -183,7 +183,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -196,7 +196,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test1fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Float?) returnType:kotlin.Boolean @@ -204,7 +204,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2fr (x: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test2fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float? declared in .test2fr' type=kotlin.Float? origin=null FUN name:test3fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -212,7 +212,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3fr (x: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test3fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null FUN name:test4fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Number) returnType:kotlin.Boolean @@ -220,7 +220,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4fr (x: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test4fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Number declared in .test4fr' type=kotlin.Number origin=null FUN name:test5fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -232,7 +232,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test5fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null @@ -248,7 +248,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test6fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/kt28006.fir.txt b/compiler/testData/ir/irText/expressions/kt28006.fir.txt index 2df56df1066..7e5f072c732 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.fir.txt @@ -60,14 +60,14 @@ FILE fqName: fileName:/kt28006.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test2' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" @@ -76,9 +76,9 @@ FILE fqName: fileName:/kt28006.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 3ab0e673495..badb6bfbd06 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -219,6 +219,7 @@ FILE fqName: fileName:/kt30020.kt FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] overridden: public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.List + public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection) returnType:kotlin.collections.MutableIterator [fake_override,operator] overridden: @@ -234,17 +235,21 @@ FILE fqName: fileName:/kt30020.kt correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.List + public abstract fun (): kotlin.Int declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any + public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String declared in kotlin.Any + public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt index 8d9e4bdfe95..65e3dc07cc8 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt @@ -21,7 +21,7 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="1234" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'private final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A' type=.A origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:kotlin.String diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index d4cf6e937d1..2ee8971aa04 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -92,7 +92,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + then: CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_1: kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.String?, y:kotlin.Any?) returnType:kotlin.Boolean? VALUE_PARAMETER name:x index:0 type:kotlin.String? @@ -110,7 +110,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.String' type=kotlin.Boolean origin=null $this: GET_VAR 'val tmp_2: kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null other: GET_VAR 'y: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null FUN name:test4 visibility:public modality:FINAL <> (x:.Ref?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt index c28b211ecb7..d8b414ae277 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt @@ -61,10 +61,10 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY CONST String type=kotlin.String value=" " - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] @@ -74,7 +74,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test7 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val] @@ -84,7 +84,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test8 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] @@ -94,7 +94,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test9 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test9 visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt index 05baacaf712..8e2d8a94752 100644 --- a/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt +++ b/compiler/testData/ir/irText/firProblems/FirBuilder.fir.txt @@ -31,11 +31,11 @@ FILE fqName: fileName:/FirBuilder.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .BaseConverter' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DeclarationsConverter modality:FINAL visibility:public superTypes:[.BaseConverter]' - FUN FAKE_OVERRIDE name:withCapturedTypeParameters visibility:public modality:FINAL ($this:.BaseConverter, block:kotlin.Function0.DeclarationsConverter.withCapturedTypeParameters>) returnType:T of .DeclarationsConverter.withCapturedTypeParameters [inline,fake_override] + FUN FAKE_OVERRIDE name:withCapturedTypeParameters visibility:public modality:FINAL ($this:.BaseFirBuilder.BaseFirBuilder>, block:kotlin.Function0.DeclarationsConverter.withCapturedTypeParameters>) returnType:T of .DeclarationsConverter.withCapturedTypeParameters [inline,fake_override] overridden: public final fun withCapturedTypeParameters (block: kotlin.Function0.BaseFirBuilder.withCapturedTypeParameters>): T of .BaseFirBuilder.withCapturedTypeParameters [inline] declared in .BaseFirBuilder TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.BaseConverter + $this: VALUE_PARAMETER name: type:.BaseFirBuilder.BaseFirBuilder> VALUE_PARAMETER name:block index:0 type:kotlin.Function0.DeclarationsConverter.withCapturedTypeParameters> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index 4df4be7a6c5..c1bc6307f3d 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/coercionInLoop.kt then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="Fail " - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null $this: GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt index 751fe1a2ddf..0d3147e7259 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt @@ -47,10 +47,10 @@ FILE fqName: fileName:/enumEntry.kt overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.Z, other:.Z) returnType:kotlin.Int [fake_override,operator] + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Z) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Z + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.Z FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index 0e098478413..3b7d9ff78e6 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -27,7 +27,7 @@ FILE fqName: fileName:/builtinMap.kt $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap.plus?, V1 of .plus?> BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .plus' - CALL 'public open fun put (p0: K of java.util.LinkedHashMap?, p1: V of java.util.LinkedHashMap?): V of java.util.LinkedHashMap? [fake_override] declared in java.util.LinkedHashMap' type=V1 of .plus? origin=null + CALL 'public open fun put (p0: K of java.util.LinkedHashMap?, p1: V of java.util.LinkedHashMap?): V of java.util.LinkedHashMap? declared in java.util.LinkedHashMap' type=V1 of .plus? origin=null $this: GET_VAR ': java.util.LinkedHashMap.plus?, V1 of .plus?> declared in .plus.' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null p0: CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=K1 of .plus origin=GET_PROPERTY $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt index 354a07332a1..2e3c14c17b6 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null @@ -12,7 +12,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsKotlin (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 @@ -20,7 +20,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testKotlinEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null $this: CONST Double type=kotlin.Double value=0.0 other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testKotlinEqualsPlatform' type=.JavaClass origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt index 54a0a35dedb..a95f15b79e0 100644 --- a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt @@ -2,12 +2,12 @@ FILE fqName: fileName:/platformTypeReceiver.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:kotlin.Boolean? visibility:public [static]' type=kotlin.Boolean? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null $this: CALL 'public open fun boolNull (): kotlin.Boolean? declared in .J' type=kotlin.Boolean? origin=null other: CONST Null type=kotlin.Nothing? value=null