From f374c36cd25114d0e4deb4ef48dca5df4828df25 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 2 Apr 2020 15:31:25 +0300 Subject: [PATCH] [FIR2IR] Generate property extension receiver references properly --- .../kotlin/fir/backend/ConversionUtils.kt | 8 +- .../fir/backend/Fir2IrConversionScope.kt | 10 ++ .../kotlin/fir/backend/Fir2IrVisitor.kt | 42 +++++---- .../generators/CallAndReferenceGenerator.kt | 7 +- compiler/testData/codegen/box/arrays/kt779.kt | 1 - .../box/callableReference/bound/multiCase.kt | 1 - .../property/extensionToArray.kt | 1 - .../property/genericProperty.kt | 1 - .../property/invokePropertyReference.kt | 1 - .../callableReference/property/kt14330_2.kt | 1 - .../property/simpleExtension.kt | 1 - .../property/simpleMutableExtension.kt | 1 - .../delegateForExtProperty.kt | 1 - .../extensionDelegatesWithSameNames.kt | 1 - .../extensionPropertyAndExtensionGetValue.kt | 1 - .../provideDelegate/extensionDelegated.kt | 1 - .../codegen/box/extensionFunctions/kt475.kt | 1 - .../genericValForPrimitiveType.kt | 1 - .../genericVarForPrimitiveType.kt | 1 - .../codegen/box/fieldRename/delegates.kt | 1 - .../annotatedMemberExtensionProperty.kt | 2 - .../boxUnboxOfInlineClassForCapturedVars.kt | 1 - .../inlineClassExtensionVal.kt | 1 - .../box/inlineClasses/whenWithSubject.kt | 1 - .../genericProperty.kt | 1 - .../box/multifileClasses/genericProperty.kt | 1 - .../codegen/box/primitiveTypes/kt935.kt | 1 - .../testData/codegen/box/properties/kt4340.kt | 1 - ...ExtensionPropertiesWithoutBackingFields.kt | 1 - .../methodsFromAny/propertyEqualsHashCode.kt | 1 - .../testData/codegen/box/safeCall/kt4733.kt | 1 - compiler/testData/codegen/box/vararg/kt581.kt | 1 - .../ir/irText/declarations/kt35550.fir.txt | 2 +- .../expressions/castToTypeParameter.fir.txt | 93 ------------------- .../irText/expressions/castToTypeParameter.kt | 1 + .../expressions/genericPropertyCall.fir.txt | 20 ---- .../irText/expressions/genericPropertyCall.kt | 1 + .../expressions/genericPropertyRef.fir.txt | 8 +- .../implicitCastToTypeParameter.fir.txt | 5 +- .../expressions/useImportedMember.fir.txt | 4 +- ...variableAsFunctionCallWithGenerics.fir.txt | 4 +- .../stubs/jdkClassSyntheticProperty.fir.txt | 2 +- .../genericDelegatedDeepProperty.fir.txt | 2 +- .../genericPropertyReferenceType.fir.txt | 4 +- 44 files changed, 64 insertions(+), 178 deletions(-) delete mode 100644 compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt delete mode 100644 compiler/testData/ir/irText/expressions/genericPropertyCall.fir.txt 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 40c41a1de05..a49de37b9af 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 @@ -26,6 +26,7 @@ import org.jetbrains.kotlin.fir.symbols.AccessorSymbol import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.ir.IrElement +import org.jetbrains.kotlin.ir.declarations.IrProperty import org.jetbrains.kotlin.ir.expressions.IrConstKind import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin import org.jetbrains.kotlin.ir.symbols.* @@ -92,7 +93,8 @@ fun FirClassifierSymbol<*>.toSymbol( fun FirReference.toSymbol( session: FirSession, classifierStorage: Fir2IrClassifierStorage, - declarationStorage: Fir2IrDeclarationStorage + declarationStorage: Fir2IrDeclarationStorage, + conversionScope: Fir2IrConversionScope ): IrSymbol? { return when (this) { is FirResolvedNamedReference -> { @@ -114,6 +116,10 @@ fun FirReference.toSymbol( when (val boundSymbol = boundSymbol) { is FirClassSymbol<*> -> classifierStorage.getIrClassSymbol(boundSymbol).owner.thisReceiver?.symbol is FirFunctionSymbol -> declarationStorage.getIrFunctionSymbol(boundSymbol).owner.extensionReceiverParameter?.symbol + is FirPropertySymbol -> { + val property = declarationStorage.getIrPropertyOrFieldSymbol(boundSymbol).owner as? IrProperty + property?.let { conversionScope.parentAccessorOfPropertyFromStack(it) }?.symbol + } else -> null } } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConversionScope.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConversionScope.kt index c6dab0333ea..3b3de00855d 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConversionScope.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConversionScope.kt @@ -23,6 +23,16 @@ class Fir2IrConversionScope { fun parentFromStack(): IrDeclarationParent = parentStack.last() + fun parentAccessorOfPropertyFromStack(property: IrProperty): IrSimpleFunction? { + for (parent in parentStack.asReversed()) { + when (parent) { + property.getter -> return property.getter + property.setter -> return property.setter + } + } + return null + } + fun applyParentFromStackTo(declaration: T): T { declaration.parent = parentStack.last() return declaration 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 37b45c76a4f..e8192312dbc 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 @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.fir.resolve.isIteratorNext import org.jetbrains.kotlin.fir.resolve.transformers.IntegerLiteralTypeApproximationTransformer import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperator import org.jetbrains.kotlin.fir.symbols.StandardClassIds +import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.fir.types.ConeClassLikeType @@ -32,10 +33,7 @@ import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.builders.* -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrFile -import org.jetbrains.kotlin.ir.declarations.IrVariable +import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.* @@ -286,22 +284,32 @@ class Fir2IrVisitor( override fun visitThisReceiverExpression(thisReceiverExpression: FirThisReceiverExpression, data: Any?): IrElement { val calleeReference = thisReceiverExpression.calleeReference val boundSymbol = calleeReference.boundSymbol - if (calleeReference.labelName == null && boundSymbol is FirClassSymbol) { - // Object case - val firClass = boundSymbol.fir as FirClass - val irClass = classifierStorage.getCachedIrClass(firClass)!! - if (firClass is FirAnonymousObject || firClass is FirRegularClass && firClass.classKind == ClassKind.OBJECT) { - if (irClass != conversionScope.lastClass()) { - return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> - IrGetObjectValueImpl(startOffset, endOffset, irClass.defaultType, irClass.symbol) + if (calleeReference.labelName == null) { + if (boundSymbol is FirClassSymbol) { + // Object case + val firClass = boundSymbol.fir as FirClass + val irClass = classifierStorage.getCachedIrClass(firClass)!! + if (firClass is FirAnonymousObject || firClass is FirRegularClass && firClass.classKind == ClassKind.OBJECT) { + if (irClass != conversionScope.lastClass()) { + return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> + IrGetObjectValueImpl(startOffset, endOffset, irClass.defaultType, irClass.symbol) + } } } - } - val dispatchReceiver = conversionScope.dispatchReceiverParameter(irClass) - if (dispatchReceiver != null) { - return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> - IrGetValueImpl(startOffset, endOffset, dispatchReceiver.type, dispatchReceiver.symbol) + val dispatchReceiver = conversionScope.dispatchReceiverParameter(irClass) + if (dispatchReceiver != null) { + return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> + IrGetValueImpl(startOffset, endOffset, dispatchReceiver.type, dispatchReceiver.symbol) + } + } + } else if (boundSymbol is FirCallableSymbol) { + val receiverSymbol = calleeReference.toSymbol(session, classifierStorage, declarationStorage, conversionScope) + val receiver = (receiverSymbol?.owner as? IrSimpleFunction)?.extensionReceiverParameter + if (receiver != null) { + return thisReceiverExpression.convertWithOffsets { startOffset, endOffset -> + IrGetValueImpl(startOffset, endOffset, receiver.type, receiver.symbol) + } } } } 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 59c874f32dd..1d3d6493a40 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 @@ -51,7 +51,7 @@ internal class CallAndReferenceGenerator( private fun ConeKotlinType.toIrType(): IrType = with(typeConverter) { toIrType() } fun convertToIrCallableReference(callableReferenceAccess: FirCallableReferenceAccess): IrExpression { - val symbol = callableReferenceAccess.calleeReference.toSymbol(session, classifierStorage, declarationStorage) + val symbol = callableReferenceAccess.calleeReference.toSymbol(session, classifierStorage, declarationStorage, conversionScope) val type = callableReferenceAccess.typeRef.toIrType() return callableReferenceAccess.convertWithOffsets { startOffset, endOffset -> when (symbol) { @@ -147,7 +147,8 @@ internal class CallAndReferenceGenerator( val symbol = qualifiedAccess.calleeReference.toSymbol( session, classifierStorage, - declarationStorage + declarationStorage, + conversionScope ) return typeRef.convertWithOffsets { startOffset, endOffset -> if (qualifiedAccess.calleeReference is FirSuperReference) { @@ -192,7 +193,7 @@ internal class CallAndReferenceGenerator( fun convertToIrSetCall(variableAssignment: FirVariableAssignment): IrExpression { val type = irBuiltIns.unitType val calleeReference = variableAssignment.calleeReference - val symbol = calleeReference.toSymbol(session, classifierStorage, declarationStorage) + val symbol = calleeReference.toSymbol(session, classifierStorage, declarationStorage, conversionScope) val origin = IrStatementOrigin.EQ return variableAssignment.convertWithOffsets { startOffset, endOffset -> val assignedValue = visitor.convertToIrExpression(variableAssignment.rValue) diff --git a/compiler/testData/codegen/box/arrays/kt779.kt b/compiler/testData/codegen/box/arrays/kt779.kt index 3ef6456bd11..a56d1e0874b 100644 --- a/compiler/testData/codegen/box/arrays/kt779.kt +++ b/compiler/testData/codegen/box/arrays/kt779.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val Array.length : Int get() = this.size fun box() = if(arrayOfNulls(10).length == 10) "OK" else "fail" diff --git a/compiler/testData/codegen/box/callableReference/bound/multiCase.kt b/compiler/testData/codegen/box/callableReference/bound/multiCase.kt index 1036d93eb93..08af3dd78ca 100644 --- a/compiler/testData/codegen/box/callableReference/bound/multiCase.kt +++ b/compiler/testData/codegen/box/callableReference/bound/multiCase.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE class A(var v: Int) { fun f(x: Int) = x * v diff --git a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt index 24f66fc91d8..455b69ae0cf 100644 --- a/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt +++ b/compiler/testData/codegen/box/callableReference/property/extensionToArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val Array.firstElement: String get() = get(0) fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/property/genericProperty.kt b/compiler/testData/codegen/box/callableReference/property/genericProperty.kt index a34b0de7e2b..63de5fccffe 100644 --- a/compiler/testData/codegen/box/callableReference/property/genericProperty.kt +++ b/compiler/testData/codegen/box/callableReference/property/genericProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE //For KT-6020 import kotlin.reflect.KProperty1 diff --git a/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt b/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt index 1c16c33a1e1..617732ae7f0 100644 --- a/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt +++ b/compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var state = "" var topLevel: Int diff --git a/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt b/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt index 697a035bb9c..d0acfccb0bd 100644 --- a/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt +++ b/compiler/testData/codegen/box/callableReference/property/kt14330_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var recivier : Any? = "fail" var value2 : Any? = "fail2" diff --git a/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt b/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt index 77e8fc1af37..28d7199fe8d 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleExtension.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val String.id: String get() = this diff --git a/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt b/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt index c53405a9697..e69cbbe72fc 100644 --- a/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt +++ b/compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var storage = 0 var Int.foo: Int diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt index e827628f708..4eac9e2dc73 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR import kotlin.reflect.KProperty class Delegate { diff --git a/compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt b/compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt index 572ac82b67a..ec5f37c0536 100644 --- a/compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt +++ b/compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class C object O : C() diff --git a/compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt b/compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt index 0534615c358..1e796085d97 100644 --- a/compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt +++ b/compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A(val o: String) interface I { diff --git a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt index b78e0d5d3b2..363d476e634 100644 --- a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt +++ b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR import kotlin.reflect.KProperty var log = "" diff --git a/compiler/testData/codegen/box/extensionFunctions/kt475.kt b/compiler/testData/codegen/box/extensionFunctions/kt475.kt index b0bce459f2d..abb3684d429 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt475.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt475.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME fun box() : String { diff --git a/compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt b/compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt index 28ffde6ff85..787ea1c0245 100644 --- a/compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt +++ b/compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val T.valProp: T get() = this diff --git a/compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt b/compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt index e087557819c..a96514698c8 100644 --- a/compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt +++ b/compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var T.varProp: T get() = this set(value: T) {} diff --git a/compiler/testData/codegen/box/fieldRename/delegates.kt b/compiler/testData/codegen/box/fieldRename/delegates.kt index 2bf6151895f..0a29a513400 100644 --- a/compiler/testData/codegen/box/fieldRename/delegates.kt +++ b/compiler/testData/codegen/box/fieldRename/delegates.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR import kotlin.reflect.KProperty public open class TestDelegate(private val initializer: () -> T) { diff --git a/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt b/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt index c1d7560f239..49255d3f930 100644 --- a/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt +++ b/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR - @Target(AnnotationTarget.PROPERTY) annotation class Anno diff --git a/compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt b/compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt index 1d56b9100a1..df21fa88cf8 100644 --- a/compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt +++ b/compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR inline class UInt(private val value: Int) { operator fun plus(other: UInt): UInt = UInt(value + other.asValue()) diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt index 02fee707441..7db8b64f40a 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME inline class Z(val x: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt b/compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt index c6aa4ddf48a..4da791e7909 100644 --- a/compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt +++ b/compiler/testData/codegen/box/inlineClasses/whenWithSubject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline class InlineLong(val value: Long) inline val Number.toInlineLong get() = InlineLong(this.toLong()) diff --git a/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt b/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt index a680bf1f161..58fc45eb26a 100644 --- a/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt +++ b/compiler/testData/codegen/box/ir/serializationRegressions/genericProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE //For KT-6020 diff --git a/compiler/testData/codegen/box/multifileClasses/genericProperty.kt b/compiler/testData/codegen/box/multifileClasses/genericProperty.kt index 472b667e0fc..914b84f1444 100644 --- a/compiler/testData/codegen/box/multifileClasses/genericProperty.kt +++ b/compiler/testData/codegen/box/multifileClasses/genericProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: A.kt diff --git a/compiler/testData/codegen/box/primitiveTypes/kt935.kt b/compiler/testData/codegen/box/primitiveTypes/kt935.kt index 2295c65dba3..b64ae3bdc3a 100644 --- a/compiler/testData/codegen/box/primitiveTypes/kt935.kt +++ b/compiler/testData/codegen/box/primitiveTypes/kt935.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS, NATIVE diff --git a/compiler/testData/codegen/box/properties/kt4340.kt b/compiler/testData/codegen/box/properties/kt4340.kt index b9a8577e094..63a97eb0f44 100644 --- a/compiler/testData/codegen/box/properties/kt4340.kt +++ b/compiler/testData/codegen/box/properties/kt4340.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { var result: Int = 0; diff --git a/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt b/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt index 5af5f8346eb..678b82c784e 100644 --- a/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt +++ b/compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR annotation class Anno @Anno val Int.foo: Int diff --git a/compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt b/compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt index b1bc93756f3..1c3342ba22f 100644 --- a/compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt +++ b/compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS // IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: JS_IR diff --git a/compiler/testData/codegen/box/safeCall/kt4733.kt b/compiler/testData/codegen/box/safeCall/kt4733.kt index 9e07a8e8adc..dde6d4af7cb 100644 --- a/compiler/testData/codegen/box/safeCall/kt4733.kt +++ b/compiler/testData/codegen/box/safeCall/kt4733.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test { val Long.foo: Long get() = this + 1 diff --git a/compiler/testData/codegen/box/vararg/kt581.kt b/compiler/testData/codegen/box/vararg/kt581.kt index 768fcfc0ace..9e7c41a3e9a 100644 --- a/compiler/testData/codegen/box/vararg/kt581.kt +++ b/compiler/testData/codegen/box/vararg/kt581.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME package whats.the.difference diff --git a/compiler/testData/ir/irText/declarations/kt35550.fir.txt b/compiler/testData/ir/irText/declarations/kt35550.fir.txt index 6e3b9f7d4d0..ea2b6b4a5ac 100644 --- a/compiler/testData/ir/irText/declarations/kt35550.fir.txt +++ b/compiler/testData/ir/irText/declarations/kt35550.fir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/kt35550.kt $receiver: VALUE_PARAMETER name: type:T of .I. BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): T of .I. declared in .I' - ERROR_CALL 'Unresolved reference: this@R|/I.id|' type=T of .I. + GET_VAR ': T of .I. declared in .I.' type=T of .I. 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 diff --git a/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt deleted file mode 100644 index 33b90c0ac50..00000000000 --- a/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt +++ /dev/null @@ -1,93 +0,0 @@ -FILE fqName: fileName:/castToTypeParameter.kt - FUN name:castFun visibility:public modality:FINAL (x:kotlin.Any) returnType:T of .castFun - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castFun (x: kotlin.Any): T of .castFun declared in ' - TYPE_OP type=T of .castFun origin=CAST typeOperand=T of .castFun - GET_VAR 'x: kotlin.Any declared in .castFun' type=kotlin.Any origin=null - FUN name:castExtFun visibility:public modality:FINAL ($receiver:kotlin.Any) returnType:T of .castExtFun - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $receiver: VALUE_PARAMETER name: type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castExtFun (): T of .castExtFun declared in ' - TYPE_OP type=T of .castExtFun origin=CAST typeOperand=T of .castExtFun - GET_VAR ': kotlin.Any declared in .castExtFun' type=kotlin.Any origin=null - PROPERTY name:castExtVal visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL ($receiver:T of .) returnType:T of . - correspondingProperty: PROPERTY name:castExtVal visibility:public modality:FINAL [val] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $receiver: VALUE_PARAMETER name: type:T of . - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of . declared in ' - TYPE_OP type=T of . origin=CAST typeOperand=T of . - ERROR_CALL 'Unresolved reference: this@R|/castExtVal|' type=T of . - CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Host.Host> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> () returnType:.Host.Host> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:castMemberFun visibility:public modality:FINAL <> ($this:.Host.Host>, x:kotlin.Any) returnType:T of .Host - $this: VALUE_PARAMETER name: type:.Host.Host> - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castMemberFun (x: kotlin.Any): T of .Host declared in .Host' - TYPE_OP type=T of .Host origin=CAST typeOperand=T of .Host - GET_VAR 'x: kotlin.Any declared in .Host.castMemberFun' type=kotlin.Any origin=null - FUN name:castGenericMemberFun visibility:public modality:FINAL ($this:.Host.Host>, x:kotlin.Any) returnType:TF of .Host.castGenericMemberFun - TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Host.Host> - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castGenericMemberFun (x: kotlin.Any): TF of .Host.castGenericMemberFun declared in .Host' - TYPE_OP type=TF of .Host.castGenericMemberFun origin=CAST typeOperand=TF of .Host.castGenericMemberFun - GET_VAR 'x: kotlin.Any declared in .Host.castGenericMemberFun' type=kotlin.Any origin=null - FUN name:castMemberExtFun visibility:public modality:FINAL <> ($this:.Host.Host>, $receiver:kotlin.Any) returnType:T of .Host - $this: VALUE_PARAMETER name: type:.Host.Host> - $receiver: VALUE_PARAMETER name: type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castMemberExtFun (): T of .Host declared in .Host' - TYPE_OP type=T of .Host origin=CAST typeOperand=T of .Host - GET_VAR ': kotlin.Any declared in .Host.castMemberExtFun' type=kotlin.Any origin=null - FUN name:castGenericMemberExtFun visibility:public modality:FINAL ($this:.Host.Host>, $receiver:kotlin.Any) returnType:TF of .Host.castGenericMemberExtFun - TYPE_PARAMETER name:TF index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Host.Host> - $receiver: VALUE_PARAMETER name: type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun castGenericMemberExtFun (): TF of .Host.castGenericMemberExtFun declared in .Host' - TYPE_OP type=TF of .Host.castGenericMemberExtFun origin=CAST typeOperand=TF of .Host.castGenericMemberExtFun - GET_VAR ': kotlin.Any declared in .Host.castGenericMemberExtFun' type=kotlin.Any origin=null - PROPERTY name:castMemberExtVal visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL <> ($this:.Host.Host>, $receiver:kotlin.Any) returnType:T of .Host - correspondingProperty: PROPERTY name:castMemberExtVal visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Host.Host> - $receiver: VALUE_PARAMETER name: type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of .Host declared in .Host' - TYPE_OP type=T of .Host origin=CAST typeOperand=T of .Host - ERROR_CALL 'Unresolved reference: this@R|/Host.castMemberExtVal|' type=kotlin.Any - PROPERTY name:castGenericMemberExtVal visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL ($this:.Host.Host>, $receiver:TV of .Host.) returnType:TV of .Host. - correspondingProperty: PROPERTY name:castGenericMemberExtVal visibility:public modality:FINAL [val] - TYPE_PARAMETER name:TV index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.Host.Host> - $receiver: VALUE_PARAMETER name: type:TV of .Host. - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): TV of .Host. declared in .Host' - TYPE_OP type=TV of .Host. origin=CAST typeOperand=TV of .Host. - ERROR_CALL 'Unresolved reference: this@R|/Host.castGenericMemberExtVal|' type=TV of .Host. - 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 diff --git a/compiler/testData/ir/irText/expressions/castToTypeParameter.kt b/compiler/testData/ir/irText/expressions/castToTypeParameter.kt index 80d4aa9a966..130ead08e72 100644 --- a/compiler/testData/ir/irText/expressions/castToTypeParameter.kt +++ b/compiler/testData/ir/irText/expressions/castToTypeParameter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun castFun(x: Any) = x as T fun Any.castExtFun() = this as T diff --git a/compiler/testData/ir/irText/expressions/genericPropertyCall.fir.txt b/compiler/testData/ir/irText/expressions/genericPropertyCall.fir.txt deleted file mode 100644 index 5c2451faa20..00000000000 --- a/compiler/testData/ir/irText/expressions/genericPropertyCall.fir.txt +++ /dev/null @@ -1,20 +0,0 @@ -FILE fqName: fileName:/genericPropertyCall.kt - PROPERTY name:id visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL ($receiver:T of .) returnType:T of . - correspondingProperty: PROPERTY name:id visibility:public modality:FINAL [val] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $receiver: VALUE_PARAMETER name: type:T of . - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): T of . declared in ' - ERROR_CALL 'Unresolved reference: this@R|/id|' type=T of . - PROPERTY name:test visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.String visibility:private [final,static] - EXPRESSION_BODY - CALL 'public final fun (): T of . declared in ' type=kotlin.String origin=GET_PROPERTY - : kotlin.String - $receiver: CONST String type=kotlin.String value="abc" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/genericPropertyCall.kt b/compiler/testData/ir/irText/expressions/genericPropertyCall.kt index 5c31b0f1772..ca1c1fec1d2 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyCall.kt +++ b/compiler/testData/ir/irText/expressions/genericPropertyCall.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL val T.id get() = this val test = "abc".id \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt index 564cbbe33fb..3c033dfdf21 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt @@ -77,7 +77,7 @@ FILE fqName: fileName:/genericPropertyRef.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null - t: ERROR_CALL 'Unresolved reference: this@R|/additionalText|' type=.Value.> + t: GET_VAR ': .Value.> declared in .' type=.Value.> origin=null p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] @@ -93,7 +93,7 @@ FILE fqName: fileName:/genericPropertyRef.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null - t: ERROR_CALL 'Unresolved reference: this@R|/additionalValue|' type=.Value.> + t: GET_VAR ': .Value.> declared in .' type=.Value.> origin=null p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any] @@ -171,7 +171,7 @@ FILE fqName: fileName:/genericPropertyRef.kt $receiver: VALUE_PARAMETER name: type:T of . BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of . declared in ' - ERROR_CALL 'Unresolved reference: this@R|/bar|' type=T of . + GET_VAR ': T of . declared in .' type=T of . origin=null FUN name: visibility:public modality:FINAL ($receiver:T of ., value:T of .) returnType:kotlin.Unit correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [var] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -179,7 +179,7 @@ FILE fqName: fileName:/genericPropertyRef.kt VALUE_PARAMETER name:value index:0 type:T of . BLOCK_BODY CALL 'public final fun (: kotlin.Any?): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : ERROR_CALL 'Unresolved reference: this@R|/bar|' type=T of . + : GET_VAR ': T of . declared in .' type=T of . origin=null CALL 'public final fun (: kotlin.Any?): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ : GET_VAR 'value: T of . declared in .' type=T of . origin=null PROPERTY name:barRef visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt index da5d737f95d..84a7ff2def2 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt @@ -38,8 +38,9 @@ FILE fqName: fileName:/implicitCastToTypeParameter.kt WHEN type=T of .? origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T of . - ERROR_CALL 'Unresolved reference: this@R|/asT|' type=.Foo.> - then: ERROR_CALL 'Unresolved reference: this@R|/asT|' type=T of . + GET_VAR ': .Foo.> declared in .' type=.Foo.> origin=null + then: TYPE_OP type=T of . origin=IMPLICIT_CAST typeOperand=T of . + GET_VAR ': .Foo.> declared in .' type=.Foo.> origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt index e5a444275f4..4a4b6ae5bb0 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: VALUE_PARAMETER name: type:T of .BaseClass. BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of .BaseClass. declared in .BaseClass' - ERROR_CALL 'Unresolved reference: this@R|/BaseClass.fromClass|' type=T of .BaseClass. + GET_VAR ': T of .BaseClass. declared in .BaseClass.' type=T of .BaseClass. 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 @@ -122,7 +122,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: VALUE_PARAMETER name: type:T of .C. BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of .C. declared in .C' - ERROR_CALL 'Unresolved reference: this@R|/C.g2|' type=T of .C. + GET_VAR ': T of .C. declared in .C.' type=T of .C. origin=null PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val] FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.C) returnType:T of .BaseClass. [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:fromClass visibility:public modality:FINAL [fake_override,val] diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt index 083c8a96192..dd9a7d0a99f 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt @@ -10,7 +10,7 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of . BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): T of . declared in .' - ERROR_CALL 'Unresolved reference: this@R|/gk|' type=T of . + GET_VAR ': T of . declared in .' type=T of . origin=null FUN name:testGeneric1 visibility:public modality:FINAL <> (x:kotlin.String) returnType:T of . VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY @@ -30,7 +30,7 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt FUN name: visibility:local modality:FINAL <> () returnType:T of . BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): T of . declared in .' - ERROR_CALL 'Unresolved reference: this@R|/kt26531Val|' type=T of . + GET_VAR ': T of . declared in .' type=T of . origin=null FUN name:kt26531 visibility:public modality:FINAL <> () returnType:T of . BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun kt26531 (): T of . declared in ' diff --git a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt index 8f08737443a..d15468d56d6 100644 --- a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt +++ b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt @@ -6,4 +6,4 @@ FILE fqName: fileName:/jdkClassSyntheticProperty.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array? declared in ' CALL 'public open fun (): kotlin.Array? declared in java.lang.Class' type=kotlin.Array? origin=GET_PROPERTY - $this: ERROR_CALL 'Unresolved reference: this@R|/test|' type=java.lang.Class<*> + $this: GET_VAR ': java.lang.Class<*> declared in .' type=java.lang.Class<*> origin=null diff --git a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt index dc9b081ec0f..5f62fc84151 100644 --- a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt +++ b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt @@ -320,6 +320,6 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt RETURN type=kotlin.Nothing from='public final fun (): .P., T of .> declared in ' CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): .P., T of .> declared in .additionalText$delegate.' type=.P., T of .> origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate. visibility:private [final,static]' type=.additionalText$delegate. origin=null - t: ERROR_CALL 'Unresolved reference: this@R|/additionalText|' type=.Value., .CR.>> + t: GET_VAR ': .Value., .CR.>> declared in .' type=.Value., .CR.>> origin=null p: PROPERTY_REFERENCE 'public final additionalText: .P., T of .> [delegated,val]' field=null getter='public final fun (): .P., T of .> declared in ' setter=null type=kotlin.reflect.KProperty1<.Value., .CR.>>, .P., T of .>> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: diff --git a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt index 8e4864169dd..b7e6168a23c 100644 --- a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt +++ b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt @@ -47,7 +47,7 @@ FILE fqName: fileName:/genericPropertyReferenceType.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of . declared in ' CALL 'public final fun (): T of .C declared in .C' type=T of . origin=GET_PROPERTY - $this: ERROR_CALL 'Unresolved reference: this@R|/y|' type=.C.> + $this: GET_VAR ': .C.> declared in .' type=.C.> origin=null FUN name: visibility:public modality:FINAL ($receiver:.C.>, v:T of .) returnType:kotlin.Unit correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [var] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -55,7 +55,7 @@ FILE fqName: fileName:/genericPropertyReferenceType.kt VALUE_PARAMETER name:v index:0 type:T of . BLOCK_BODY CALL 'public final fun (: T of .C): kotlin.Unit declared in .C' type=kotlin.Unit origin=EQ - $this: ERROR_CALL 'Unresolved reference: this@R|/y|' type=.C.> + $this: GET_VAR ': .C.> declared in .' type=.C.> origin=null : GET_VAR 'v: T of . declared in .' type=T of . origin=null FUN name:use visibility:public modality:FINAL <> (p:kotlin.reflect.KMutableProperty) returnType:kotlin.Unit VALUE_PARAMETER name:p index:0 type:kotlin.reflect.KMutableProperty