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 5d34c893c4a..34a46a45b94 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 @@ -25,6 +25,7 @@ import org.jetbrains.kotlin.fir.declarations.utils.visibility import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.extensions.declarationGenerators import org.jetbrains.kotlin.fir.extensions.extensionService +import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression import org.jetbrains.kotlin.fir.references.FirErrorNamedReference import org.jetbrains.kotlin.fir.references.FirReference import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference @@ -161,17 +162,19 @@ fun FirClassifierSymbol<*>.toSymbol( } private fun FirBasedSymbol<*>.toSymbolForCall( + dispatchReceiver: FirExpression, session: FirSession, classifierStorage: Fir2IrClassifierStorage, declarationStorage: Fir2IrDeclarationStorage, preferGetter: Boolean ) = when (this) { - is FirCallableSymbol<*> -> unwrapCallRepresentative().toSymbolForCall(declarationStorage, preferGetter) + is FirCallableSymbol<*> -> unwrapCallRepresentative().toSymbolForCall(dispatchReceiver, declarationStorage, preferGetter) is FirClassifierSymbol<*> -> toSymbol(session, classifierStorage) else -> error("Unknown symbol: $this") } fun FirReference.toSymbolForCall( + dispatchReceiver: FirExpression, session: FirSession, classifierStorage: Fir2IrClassifierStorage, declarationStorage: Fir2IrDeclarationStorage, @@ -179,8 +182,10 @@ fun FirReference.toSymbolForCall( preferGetter: Boolean = true ): IrSymbol? { return when (this) { - is FirResolvedNamedReference -> resolvedSymbol.toSymbolForCall(session, classifierStorage, declarationStorage, preferGetter) - is FirErrorNamedReference -> candidateSymbol?.toSymbolForCall(session, classifierStorage, declarationStorage, preferGetter) + is FirResolvedNamedReference -> + resolvedSymbol.toSymbolForCall(dispatchReceiver, session, classifierStorage, declarationStorage, preferGetter) + is FirErrorNamedReference -> + candidateSymbol?.toSymbolForCall(dispatchReceiver, session, classifierStorage, declarationStorage, preferGetter) is FirThisReference -> { when (val boundSymbol = boundSymbol) { is FirClassSymbol<*> -> classifierStorage.getIrClassSymbol(boundSymbol).owner.thisReceiver?.symbol @@ -196,9 +201,20 @@ fun FirReference.toSymbolForCall( } } -private fun FirCallableSymbol<*>.toSymbolForCall(declarationStorage: Fir2IrDeclarationStorage, preferGetter: Boolean): IrSymbol? = - when (this) { - is FirFunctionSymbol<*> -> declarationStorage.getIrFunctionSymbol(this) +private fun FirCallableSymbol<*>.toSymbolForCall( + dispatchReceiver: FirExpression, + declarationStorage: Fir2IrDeclarationStorage, + preferGetter: Boolean +): IrSymbol? { + val dispatchReceiverLookupTag = when (dispatchReceiver) { + is FirNoReceiverExpression -> null + else -> { + val session = declarationStorage.session + val coneType = dispatchReceiver.typeRef.coneType.lowerBoundIfFlexible() + (coneType as? ConeClassLikeType)?.fullyExpandedType(session)?.lookupTag + } + } + return when (this) { is FirSimpleSyntheticPropertySymbol -> { (fir as? FirSyntheticProperty)?.let { syntheticProperty -> val delegateSymbol = if (preferGetter) { @@ -207,16 +223,18 @@ private fun FirCallableSymbol<*>.toSymbolForCall(declarationStorage: Fir2IrDecla syntheticProperty.setter?.delegate?.symbol ?: throw AssertionError("Written synthetic property must have a setter") } - delegateSymbol.unwrapCallRepresentative().toSymbolForCall(declarationStorage, preferGetter) + delegateSymbol.unwrapCallRepresentative().toSymbolForCall(dispatchReceiver, declarationStorage, preferGetter) } ?: declarationStorage.getIrPropertySymbol(this) } - is FirPropertySymbol -> declarationStorage.getIrPropertySymbol(this) + is FirFunctionSymbol<*> -> declarationStorage.getIrFunctionSymbol(this, dispatchReceiverLookupTag) + is FirPropertySymbol -> declarationStorage.getIrPropertySymbol(this, dispatchReceiverLookupTag) is FirFieldSymbol -> declarationStorage.getIrFieldSymbol(this) is FirBackingFieldSymbol -> declarationStorage.getIrBackingFieldSymbol(this) is FirDelegateFieldSymbol -> declarationStorage.getIrDelegateFieldSymbol(this) is FirVariableSymbol<*> -> declarationStorage.getIrValueSymbol(this) else -> null } +} fun FirConstExpression<*>.getIrConstKind(): IrConstKind<*> = when (kind) { ConstantValueKind.IntegerLiteral -> { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index 5c8be33e211..0f592886b78 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -267,8 +267,6 @@ class Fir2IrDeclarationStorage( parent = irParent if (irParent is IrExternalPackageFragment) { irParent.declarations += this - } else if (irParent is IrClass) { - // TODO: irParent.declarations += this (probably needed for external stuff) } } } @@ -599,7 +597,7 @@ class Fir2IrDeclarationStorage( else symbolTable.declareSimpleFunction(signature, { Fir2IrSimpleFunctionSymbol(signature, containerSource) }, factory) - internal fun createIrPropertyAccessor( + private fun createIrPropertyAccessor( propertyAccessor: FirPropertyAccessor?, property: FirProperty, correspondingProperty: IrDeclarationWithName, @@ -1089,7 +1087,10 @@ class Fir2IrDeclarationStorage( ) as IrConstructorSymbol } - fun getIrFunctionSymbol(firFunctionSymbol: FirFunctionSymbol<*>): IrFunctionSymbol { + fun getIrFunctionSymbol( + firFunctionSymbol: FirFunctionSymbol<*>, + dispatchReceiverLookupTag: ConeClassLikeLookupTag? = null + ): IrFunctionSymbol { return when (val fir = firFunctionSymbol.fir) { is FirAnonymousFunction -> { getCachedIrFunction(fir)?.let { return it.symbol } @@ -1099,7 +1100,7 @@ class Fir2IrDeclarationStorage( createIrFunction(fir, irParent, predefinedOrigin = declarationOrigin).symbol } is FirSimpleFunction -> { - return getIrCallableSymbol( + val originalSymbol = getIrCallableSymbol( firFunctionSymbol, getCachedIrDeclaration = ::getCachedIrFunction, createIrDeclaration = { parent, origin -> createIrFunction(fir, parent, predefinedOrigin = origin) }, @@ -1125,6 +1126,17 @@ class Fir2IrDeclarationStorage( irFunction } ) as IrFunctionSymbol + if (dispatchReceiverLookupTag != null && dispatchReceiverLookupTag != firFunctionSymbol.containingClass()) { + val dispatchReceiverIrClass = + classifierStorage.getIrClassSymbol(dispatchReceiverLookupTag.toSymbol(session) as FirClassSymbol).owner + dispatchReceiverIrClass.declarations.find { + it is IrSimpleFunction && it.isFakeOverride && it.name == fir.name && + it.overrides(originalSymbol.owner as IrSimpleFunction) + }?.symbol as? IrFunctionSymbol + ?: originalSymbol // Fallback (normally we should not be here, but f/o are bound too late) + } else { + originalSymbol + } } is FirConstructor -> { getIrConstructorSymbol(fir.symbol) @@ -1133,12 +1145,15 @@ class Fir2IrDeclarationStorage( } } - fun getIrPropertySymbol(firPropertySymbol: FirPropertySymbol): IrSymbol { + fun getIrPropertySymbol( + firPropertySymbol: FirPropertySymbol, + dispatchReceiverLookupTag: ConeClassLikeLookupTag? = null + ): IrSymbol { val fir = firPropertySymbol.fir if (fir.isLocal) { return localStorage.getDelegatedProperty(fir)?.symbol ?: getIrVariableSymbol(fir) } - return getIrCallableSymbol( + val originalSymbol = getIrCallableSymbol( firPropertySymbol, getCachedIrDeclaration = ::getCachedIrProperty, createIrDeclaration = { parent, origin -> createIrProperty(fir, parent, predefinedOrigin = origin) }, @@ -1161,6 +1176,16 @@ class Fir2IrDeclarationStorage( return symbol } ) + return if (dispatchReceiverLookupTag != null && dispatchReceiverLookupTag != firPropertySymbol.containingClass()) { + val dispatchReceiverIrClass = + classifierStorage.getIrClassSymbol(dispatchReceiverLookupTag.toSymbol(session) as FirClassSymbol).owner + dispatchReceiverIrClass.declarations.find { + it is IrProperty && it.isFakeOverride && it.name == fir.name && it.overrides(originalSymbol.owner as IrProperty) + }?.symbol as? IrPropertySymbol + ?: originalSymbol // Fallback (normally we should not be here, but f/o are bound too late) + } else { + originalSymbol + } } private inline fun < @@ -1247,7 +1272,7 @@ class Fir2IrDeclarationStorage( return getIrPropertyForwardedSymbol(firVariableSymbol.fir) } - fun getIrPropertyForwardedSymbol(fir: FirVariable): IrSymbol { + private fun getIrPropertyForwardedSymbol(fir: FirVariable): IrSymbol { return when (fir) { is FirProperty -> { if (fir.isLocal) { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 9358f78f2da..6cb180a2aea 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -23,6 +23,7 @@ import org.jetbrains.kotlin.fir.declarations.utils.isSynthetic import org.jetbrains.kotlin.fir.declarations.utils.visibility import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.impl.FirElseIfTrueCondition +import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression import org.jetbrains.kotlin.fir.expressions.impl.FirStubStatement import org.jetbrains.kotlin.fir.expressions.impl.FirUnitExpression import org.jetbrains.kotlin.fir.references.FirReference @@ -443,7 +444,7 @@ class Fir2IrVisitor( } } } else if (boundSymbol is FirCallableSymbol) { - val receiverSymbol = calleeReference.toSymbolForCall(session, classifierStorage, declarationStorage, conversionScope) + val receiverSymbol = calleeReference.toSymbolForCall(FirNoReceiverExpression, session, classifierStorage, declarationStorage, conversionScope) val receiver = (receiverSymbol?.owner as? IrSimpleFunction)?.extensionReceiverParameter if (receiver != null) { return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index 90406c92eba..96873253979 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -70,8 +70,9 @@ class CallAndReferenceGenerator( callableReferenceAccess: FirCallableReferenceAccess, explicitReceiverExpression: IrExpression? ): IrExpression { - val symbol = - callableReferenceAccess.calleeReference.toSymbolForCall(session, classifierStorage, declarationStorage, conversionScope) + val symbol = callableReferenceAccess.calleeReference.toSymbolForCall( + callableReferenceAccess.dispatchReceiver, session, classifierStorage, declarationStorage, conversionScope + ) val type = callableReferenceAccess.typeRef.toIrType() // val x by y -> // val `x$delegate` = y @@ -233,15 +234,17 @@ class CallAndReferenceGenerator( val samConstructorCall = qualifiedAccess.tryConvertToSamConstructorCall(type) if (samConstructorCall != null) return samConstructorCall - val symbol = qualifiedAccess.calleeReference.toSymbolForCall( + val dispatchReceiver = qualifiedAccess.dispatchReceiver + val calleeReference = qualifiedAccess.calleeReference + val symbol = calleeReference.toSymbolForCall( + dispatchReceiver, session, classifierStorage, declarationStorage, conversionScope ) return qualifiedAccess.convertWithOffsets { startOffset, endOffset -> - val dispatchReceiver = qualifiedAccess.dispatchReceiver - if (qualifiedAccess.calleeReference is FirSuperReference) { + if (calleeReference is FirSuperReference) { if (dispatchReceiver !is FirNoReceiverExpression) { return@convertWithOffsets visitor.convertToIrExpression(dispatchReceiver) } @@ -253,7 +256,7 @@ class CallAndReferenceGenerator( startOffset, endOffset, type, symbol, typeArgumentsCount = symbol.owner.typeParameters.size, valueArgumentsCount = symbol.owner.valueParameters.size, - origin = qualifiedAccess.calleeReference.statementOrigin(), + origin = calleeReference.statementOrigin(), superQualifierSymbol = dispatchReceiver.superQualifierSymbol() ) } @@ -283,22 +286,22 @@ class CallAndReferenceGenerator( ) else -> IrErrorCallExpressionImpl( startOffset, endOffset, type, - description = "No getter or backing field found for ${qualifiedAccess.calleeReference.render()}" + description = "No getter or backing field found for ${calleeReference.render()}" ) } } is IrFieldSymbol -> IrGetFieldImpl( startOffset, endOffset, symbol, type, - origin = IrStatementOrigin.GET_PROPERTY.takeIf { qualifiedAccess.calleeReference !is FirDelegateFieldReference }, + origin = IrStatementOrigin.GET_PROPERTY.takeIf { calleeReference !is FirDelegateFieldReference }, superQualifierSymbol = dispatchReceiver.superQualifierSymbol() ) is IrValueSymbol -> IrGetValueImpl( startOffset, endOffset, type, symbol, origin = if (variableAsFunctionMode) IrStatementOrigin.VARIABLE_AS_FUNCTION - else qualifiedAccess.calleeReference.statementOrigin() + else calleeReference.statementOrigin() ) is IrEnumEntrySymbol -> IrGetEnumValueImpl(startOffset, endOffset, type, symbol) - else -> generateErrorCallExpression(startOffset, endOffset, qualifiedAccess.calleeReference, type) + else -> generateErrorCallExpression(startOffset, endOffset, calleeReference, type) } }.applyTypeArguments(qualifiedAccess).applyReceivers(qualifiedAccess, explicitReceiverExpression) .applyCallArguments(qualifiedAccess as? FirCall, annotationMode) @@ -314,10 +317,10 @@ class CallAndReferenceGenerator( try { val type = irBuiltIns.unitType val calleeReference = variableAssignment.calleeReference - val symbol = - calleeReference.toSymbolForCall(session, classifierStorage, declarationStorage, conversionScope, preferGetter = false) + val symbol = calleeReference.toSymbolForCall( + variableAssignment.dispatchReceiver, session, classifierStorage, declarationStorage, conversionScope, preferGetter = false + ) val origin = variableAssignment.getIrAssignmentOrigin() - return variableAssignment.convertWithOffsets { startOffset, endOffset -> val assignedValue = visitor.convertToIrExpression(variableAssignment.rValue) when (symbol) { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt index 8c2c13cfbb7..b8852357880 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol +import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -68,11 +69,12 @@ val IrFunction.isSuspend get() = this is IrSimpleFunction && this.isSuspend val IrFunction.isReal get() = !(this is IrSimpleFunction && isFakeOverride) -fun IrSimpleFunction.overrides(other: IrSimpleFunction): Boolean { +fun IrOverridableDeclaration.overrides(other: IrOverridableDeclaration): Boolean { if (this == other) return true this.overriddenSymbols.forEach { - if (it.owner.overrides(other)) { + @Suppress("UNCHECKED_CAST") + if ((it.owner as IrOverridableDeclaration).overrides(other)) { return true } } diff --git a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt index b092df3d6de..6b756225ee4 100644 --- a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt +++ b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt @@ -53,7 +53,7 @@ FILE fqName: fileName:/noSymbolForIntRangeIterator.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR + CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE $this: CONST Int type=kotlin.Int value=0 other: GET_VAR 'val x: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null @@ -73,7 +73,7 @@ FILE fqName: fileName:/noSymbolForIntRangeIterator.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR + CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE $this: CONST Int type=kotlin.Int value=0 other: GET_VAR 'val y: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt index 97fade9aa0a..87bad13f63a 100644 --- a/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR - fun testBoolean(): Int { val b: Boolean? = true return b!!.hashCode() diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt index b0f044f0422..0308a417e90 100644 --- a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR - fun box(): String { 230?.hashCode() diff --git a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt index a45f8f0f14c..bef3467606b 100644 --- a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt +++ b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // FILE: utils.kt diff --git a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt index fdbac019ff0..bffb0fbd2fa 100644 --- a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt +++ b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 fun box(): String { diff --git a/compiler/testData/ir/irText/classes/enum.fir.ir.txt b/compiler/testData/ir/irText/classes/enum.fir.ir.txt index 2d6acd08fe7..0e46e8b38c1 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.ir.txt @@ -340,7 +340,7 @@ FILE fqName: fileName:/enum.kt BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null - value: CALL 'public final fun (): kotlin.Int declared in .TestEnum4' type=kotlin.Int origin=GET_PROPERTY + value: CALL 'public final fun (): kotlin.Int [fake_override] declared in .TestEnum4.TEST2' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Unit overridden: diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt index 04da0f6653b..47c99bb1661 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt @@ -159,7 +159,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 diff --git a/compiler/testData/ir/irText/classes/kt19306.fir.ir.txt b/compiler/testData/ir/irText/classes/kt19306.fir.ir.txt deleted file mode 100644 index 3be9c71437e..00000000000 --- a/compiler/testData/ir/irText/classes/kt19306.fir.ir.txt +++ /dev/null @@ -1,77 +0,0 @@ -FILE fqName:test1 fileName:/kt19306_test1.kt - CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test1.A - CONSTRUCTOR visibility:public <> () returnType:test1.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' - PROPERTY name:p visibility:protected modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.String visibility:private - EXPRESSION_BODY - CONST String type=kotlin.String value="" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String - correspondingProperty: PROPERTY name:p visibility:protected modality:FINAL [var] - $this: VALUE_PARAMETER name: type:test1.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='protected final fun (): kotlin.String declared in test1.A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.String visibility:private' type=kotlin.String origin=null - receiver: GET_VAR ': test1.A declared in test1.A.' type=test1.A origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:test1.A, :kotlin.String) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:p visibility:protected modality:FINAL [var] - $this: VALUE_PARAMETER name: type:test1.A - VALUE_PARAMETER name: index:0 type:kotlin.String - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.String visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': test1.A declared in test1.A.' type=test1.A origin=null - value: GET_VAR ': kotlin.String declared in test1.A.' type=kotlin.String origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any -FILE fqName:test2 fileName:/kt19306_test2.kt - CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test2.B - CONSTRUCTOR visibility:public <> () returnType:test2.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in test1.A' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[test1.A]' - FUN name:test visibility:public modality:FINAL <> ($this:test2.B) returnType:kotlin.Function0 - $this: VALUE_PARAMETER name: type:test2.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (): kotlin.Function0 declared in test2.B' - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in test2.B.test' - CALL 'protected final fun (): kotlin.String declared in test1.A' type=kotlin.String origin=GET_PROPERTY - $this: GET_VAR ': test2.B declared in test2.B.test' type=test2.B origin=null - PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - overridden: - protected final p: kotlin.String [var] - FUN FAKE_OVERRIDE name: visibility:protected modality:FINAL <> ($this:test1.A) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:p visibility:protected modality:FINAL [fake_override,var] - overridden: - protected final fun (): kotlin.String declared in test1.A - $this: VALUE_PARAMETER name: type:test1.A - 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 [fake_override,operator] declared in test1.A - $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 [fake_override] declared in test1.A - $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 [fake_override] declared in test1.A - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/kt19306.kt b/compiler/testData/ir/irText/classes/kt19306.kt index 984402638ab..5cd77ac481a 100644 --- a/compiler/testData/ir/irText/classes/kt19306.kt +++ b/compiler/testData/ir/irText/classes/kt19306.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_KT_DUMP // FILE: kt19306_test1.kt package test1 diff --git a/compiler/testData/ir/irText/expressions/equals.fir.ir.txt b/compiler/testData/ir/irText/expressions/equals.fir.ir.txt index a08f512c2a4..b147a3994e3 100644 --- a/compiler/testData/ir/irText/expressions/equals.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/equals.fir.ir.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:@[FlexibleNullability] kotlin.Int? visibility:public [static]' type=@[FlexibleNullability] kotlin.Int? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.ir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.ir.txt index f55cf0a5762..f294256fc58 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.ir.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/for.fir.ir.txt b/compiler/testData/ir/irText/expressions/for.fir.ir.txt index 7e2a2ff67d7..7d1da58e62c 100644 --- a/compiler/testData/ir/irText/expressions/for.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/for.fir.ir.txt @@ -59,7 +59,7 @@ FILE fqName: fileName:/for.kt BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR + CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE $this: CONST Int type=kotlin.Int value=1 other: CONST Int type=kotlin.Int value=10 diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt index ab78b963695..1cbc2e7fb9d 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt @@ -78,13 +78,13 @@ FILE fqName: fileName:/kt16904.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .A' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[.A]' CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in .B' type=kotlin.Unit origin=null - $this: CALL 'public final fun (): .B declared in .A' type=.B origin=GET_PROPERTY + $this: CALL 'public final fun (): .B [fake_override] declared in .Test1' type=.B origin=GET_PROPERTY $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null x: CONST Int type=kotlin.Int value=42 - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .A' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit [fake_override] declared in .Test1' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in .A' type=kotlin.Int origin=GET_PROPERTY + $this: CALL 'public final fun (): kotlin.Int [fake_override] declared in .Test1' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null other: CONST Int type=kotlin.Int value=42 PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] diff --git a/compiler/testData/ir/irText/expressions/kt35730.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt35730.fir.ir.txt deleted file mode 100644 index db31dbdabd6..00000000000 --- a/compiler/testData/ir/irText/expressions/kt35730.fir.ir.txt +++ /dev/null @@ -1,48 +0,0 @@ -FILE fqName: fileName:/kt35730.kt - CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Base - FUN name:foo visibility:public modality:OPEN <> ($this:.Base) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Base - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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 - $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 - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS OBJECT name:Derived modality:FINAL visibility:public superTypes:[.Base] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Derived - CONSTRUCTOR visibility:private <> () returnType:.Derived [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Derived modality:FINAL visibility:public superTypes:[.Base]' - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.Base) returnType:kotlin.Unit [fake_override] - overridden: - public open fun foo (): kotlin.Unit declared in .Base - $this: VALUE_PARAMETER name: type:.Base - 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 [fake_override,operator] declared in .Base - $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 [fake_override] declared in .Base - $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 [fake_override] declared in .Base - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public open fun foo (): kotlin.Unit declared in .Base' type=kotlin.Unit origin=null - $this: GET_OBJECT 'CLASS OBJECT name:Derived modality:FINAL visibility:public superTypes:[.Base]' type=.Derived - CALL 'public open fun foo (): kotlin.Unit declared in .Base' type=kotlin.Unit origin=null - $this: GET_OBJECT 'CLASS OBJECT name:Derived modality:FINAL visibility:public superTypes:[.Base]' type=.Derived diff --git a/compiler/testData/ir/irText/expressions/kt35730.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt35730.fir.kt.txt deleted file mode 100644 index 44446d56be0..00000000000 --- a/compiler/testData/ir/irText/expressions/kt35730.fir.kt.txt +++ /dev/null @@ -1,19 +0,0 @@ -interface Base { - fun foo() { - } - -} - -object Derived : Base { - private constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - -} - -fun test() { - Derived.foo() - Derived.foo() -} diff --git a/compiler/testData/ir/irText/expressions/kt35730.kt b/compiler/testData/ir/irText/expressions/kt35730.kt index c1daeb09f47..f7aa9adc9ee 100644 --- a/compiler/testData/ir/irText/expressions/kt35730.kt +++ b/compiler/testData/ir/irText/expressions/kt35730.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL import Derived.foo interface Base { fun foo() {} diff --git a/compiler/testData/ir/irText/expressions/kt47245.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt47245.fir.ir.txt deleted file mode 100644 index 415ebb77139..00000000000 --- a/compiler/testData/ir/irText/expressions/kt47245.fir.ir.txt +++ /dev/null @@ -1,19 +0,0 @@ -FILE fqName: fileName:/kt47245.kt - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=0 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator [val] declared in .test' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator [val] declared in .test' type=kotlin.collections.IntIterator origin=null - BLOCK type=kotlin.Unit origin=null - FUN LOCAL_FUNCTION name:x visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/kt47245.kt b/compiler/testData/ir/irText/expressions/kt47245.kt index c6fc980d86a..fafd5399b0c 100644 --- a/compiler/testData/ir/irText/expressions/kt47245.kt +++ b/compiler/testData/ir/irText/expressions/kt47245.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_KT_DUMP fun test() { diff --git a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt index 651eace0334..d98d365f14a 100644 --- a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt @@ -141,10 +141,10 @@ FILE fqName: fileName:/kt49203.kt VALUE_PARAMETER name:b index:0 type:.B BLOCK_BODY CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit [operator] declared in .X' type=kotlin.Unit origin=null - $this: CALL 'public final fun (): .X declared in .A' type=.X origin=GET_PROPERTY + $this: CALL 'public final fun (): .X [fake_override] declared in .B' type=.X origin=GET_PROPERTY $this: GET_VAR 'b: .B declared in .test' type=.B origin=null data: CONST String type=kotlin.String value="x" CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit [operator] declared in .X' type=kotlin.Unit origin=null - $this: CALL 'public final fun (): .X declared in .A' type=.X origin=GET_PROPERTY + $this: CALL 'public final fun (): .X [fake_override] declared in .B' type=.X origin=GET_PROPERTY $this: GET_VAR 'b: .B declared in .test' type=.B origin=null data: CONST String type=kotlin.String value="y" diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.ir.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.ir.txt index 22f562e297c..520cbe9d86c 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.ir.txt @@ -86,7 +86,7 @@ FILE fqName: fileName:/multipleThisReferences.kt FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:private [final] EXPRESSION_BODY CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun (): kotlin.Int declared in .Outer.Inner' type=kotlin.Int origin=GET_PROPERTY + $this: CALL 'public final fun (): kotlin.Int [fake_override] declared in .Host.test.' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Host.test. declared in .Host.test.' type=.Host.test. origin=null other: CALL 'public final fun (): kotlin.Int declared in .Host' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Host declared in .Host.test' type=.Host origin=null diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.ir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.ir.txt index 0099bec0a0b..89b6504723b 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.ir.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/useImportedMember.fir.ir.txt b/compiler/testData/ir/irText/expressions/useImportedMember.fir.ir.txt index 89ff7e1629c..46d3f51424a 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.fir.ir.txt @@ -260,7 +260,7 @@ FILE fqName: fileName:/useImportedMember.kt BRANCH if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun (): T of .BaseClass. declared in .BaseClass' type=kotlin.String origin=GET_PROPERTY + arg0: CALL 'public final fun (): T of .C. [fake_override] declared in .C' type=kotlin.String origin=GET_PROPERTY : kotlin.String $this: GET_OBJECT 'CLASS OBJECT name:C modality:FINAL visibility:public superTypes:[.BaseClass; .I]' type=.C $receiver: CONST String type=kotlin.String value="10" diff --git a/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.fir.ir.txt b/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.fir.ir.txt index f4783e7ebe7..b3cfa5a8d65 100644 --- a/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.fir.ir.txt @@ -43,7 +43,7 @@ FILE fqName: fileName:/InnerClassInAnonymous.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.String declared in .box..Some' CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS - $this: CALL 'public final fun (): kotlin.String declared in .box..Base' type=kotlin.String origin=GET_PROPERTY + $this: CALL 'public final fun (): kotlin.String [fake_override] declared in .box..Some' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .box..Some declared in .box..Some.bar' type=.box..Some origin=null other: CALL 'public final fun (): kotlin.String declared in .box.' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .box. declared in .box.' type=.box. origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.ir.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.ir.txt index 59795c59904..58cbf87ee63 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.ir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.ir.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 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] 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 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] 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 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] 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.ir.txt b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.ir.txt index cd34dcf7523..975b3581f1e 100644 --- a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.ir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.ir.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:@[FlexibleNullability] kotlin.Boolean? visibility:public [static]' type=@[FlexibleNullability] 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 (): @[FlexibleNullability] kotlin.Boolean? declared in .J' type=@[FlexibleNullability] kotlin.Boolean? origin=null other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.fir.ir.txt b/compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.fir.ir.txt index 7660e457490..9d22b7d67e4 100644 --- a/compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.fir.ir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.fir.ir.txt @@ -79,7 +79,7 @@ FILE fqName: fileName:/smartCastOnFakeOverrideReceiver.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=.B GET_VAR 'x: kotlin.Any declared in .B.testB1' type=kotlin.Any origin=null - then: CALL 'public final fun f (): kotlin.Int declared in .A' type=kotlin.Int origin=null + then: CALL 'public final fun f (): kotlin.Int [fake_override] declared in .B' type=kotlin.Int origin=null $this: TYPE_OP type=.B origin=IMPLICIT_CAST typeOperand=.B GET_VAR 'x: kotlin.Any declared in .B.testB1' type=kotlin.Any origin=null BRANCH @@ -94,7 +94,7 @@ FILE fqName: fileName:/smartCastOnFakeOverrideReceiver.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=.B GET_VAR 'x: kotlin.Any declared in .B.testB2' type=kotlin.Any origin=null - then: CALL 'public final fun (): kotlin.Int declared in .A' type=kotlin.Int origin=GET_PROPERTY + then: CALL 'public final fun (): kotlin.Int [fake_override] declared in .B' type=kotlin.Int origin=GET_PROPERTY $this: TYPE_OP type=.B origin=IMPLICIT_CAST typeOperand=.B GET_VAR 'x: kotlin.Any declared in .B.testB2' type=kotlin.Any origin=null BRANCH