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 0f100c5d9c4..15033bd1ef1 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 @@ -408,7 +408,10 @@ class Fir2IrDeclarationStorage( return this } - private fun T.declareParameters(function: FirFunction<*>?, containingClass: IrClass?, isStatic: Boolean) { + private fun T.declareParameters( + function: FirFunction<*>?, containingClass: IrClass?, + isStatic: Boolean, parentReceiverType: FirTypeRef? = null + ) { val parent = this if (function is FirSimpleFunction) { setTypeParameters(function) @@ -428,7 +431,7 @@ class Fir2IrDeclarationStorage( } if (function !is FirConstructor) { val thisOrigin = IrDeclarationOrigin.DEFINED - val receiverTypeRef = function?.receiverTypeRef + val receiverTypeRef = function?.receiverTypeRef ?: parentReceiverType if (receiverTypeRef != null) { extensionReceiverParameter = receiverTypeRef.convertWithOffsets { startOffset, endOffset -> declareThisReceiverParameter( @@ -455,11 +458,12 @@ class Fir2IrDeclarationStorage( descriptor: WrappedCallableDescriptor, irParent: IrDeclarationParent?, isStatic: Boolean, - shouldLeaveScope: Boolean + shouldLeaveScope: Boolean, + parentReceiverType: FirTypeRef? = null ): T { descriptor.bind(this) enterScope(descriptor) - declareParameters(function, containingClass = irParent as? IrClass, isStatic = isStatic) + declareParameters(function, containingClass = irParent as? IrClass, isStatic = isStatic, parentReceiverType = parentReceiverType) if (shouldLeaveScope) { leaveScope(descriptor) } @@ -592,9 +596,14 @@ class Fir2IrDeclarationStorage( isSetter: Boolean, origin: IrDeclarationOrigin, startOffset: Int, - endOffset: Int + endOffset: Int, + parentPropertyReceiverType: FirTypeRef? = null ): IrSimpleFunction { - val descriptor = WrappedSimpleFunctionDescriptor() + val propertyDescriptor = correspondingProperty.descriptor + val descriptor = + if (propertyDescriptor is WrappedPropertyDescriptorWithContainerSource) + WrappedFunctionDescriptorWithContainerSource(propertyDescriptor.containerSource) + else WrappedSimpleFunctionDescriptor() val prefix = if (isSetter) "set" else "get" return irSymbolTable.declareSimpleFunction( propertyAccessor?.psi?.startOffsetSkippingComments ?: startOffset, @@ -615,7 +624,8 @@ class Fir2IrDeclarationStorage( declareDefaultSetterParameter(propertyType) } }.bindAndDeclareParameters( - propertyAccessor, descriptor, irParent, isStatic = irParent !is IrClass, shouldLeaveScope = true + propertyAccessor, descriptor, irParent, isStatic = irParent !is IrClass, shouldLeaveScope = true, + parentReceiverType = parentPropertyReceiverType ).apply { if (irParent != null) { parent = irParent @@ -692,6 +702,7 @@ class Fir2IrDeclarationStorage( ).apply { descriptor.bind(this) val type = property.returnTypeRef.toIrType(session, this@Fir2IrDeclarationStorage) + val receiverType = if (property.containerSource != null) property.receiverTypeRef else null getter = createIrPropertyAccessor( property.getter, this, type, irParent, false, when { @@ -699,7 +710,7 @@ class Fir2IrDeclarationStorage( property.getter is FirDefaultPropertyGetter -> IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR else -> origin }, - startOffset, endOffset + startOffset, endOffset, parentPropertyReceiverType = receiverType ) if (property.isVar) { setter = createIrPropertyAccessor( @@ -709,7 +720,8 @@ class Fir2IrDeclarationStorage( property.setter is FirDefaultPropertySetter -> IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR else -> origin }, - startOffset, endOffset + startOffset, endOffset, + parentPropertyReceiverType = receiverType ) } } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt index 70ae4eebf21..f54407ee4a5 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.codegen.PackageCodegenImpl import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor import org.jetbrains.kotlin.ir.declarations.IrModuleFragment +import org.jetbrains.kotlin.ir.descriptors.WrappedDeclarationDescriptor import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator import org.jetbrains.kotlin.ir.util.SymbolTable @@ -48,7 +49,8 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory ExternalDependenciesGenerator(symbolTable, irProviders).generateUnboundSymbolsAsDependencies() val stubGenerator = irProviders.filterIsInstance().first() - for (descriptor in symbolTable.functionDescriptorsWithNonClassParent()) { + for (descriptor in symbolTable.wrappedTopLevelCallableDescriptors()) { + descriptor as WrappedDeclarationDescriptor<*> val parentClass = stubGenerator.generateOrGetFacadeClass(descriptor) descriptor.owner.parent = parentClass ?: throw AssertionError("Facade class for ${descriptor.name} not found") } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt index 193de4873e3..7f183e6e349 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt @@ -30,6 +30,7 @@ import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.impl.* import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType +import org.jetbrains.kotlin.serialization.deserialization.descriptors.DescriptorWithContainerSource interface IrProvider { fun getDeclaration(symbol: IrSymbol): IrDeclaration? @@ -831,11 +832,15 @@ open class SymbolTable(val signaturer: IdSignatureComposer) : ReferenceSymbolTab throw IllegalArgumentException("Unexpected value descriptor: $value") } - fun functionDescriptorsWithNonClassParent(): Set { - val result = mutableSetOf() + fun wrappedTopLevelCallableDescriptors(): Set { + val result = mutableSetOf() for (descriptor in simpleFunctionSymbolTable.descriptorToSymbol.keys) { - if (descriptor is WrappedFunctionDescriptorWithContainerSource - && descriptor.owner.parent !is IrClass) { + if (descriptor is WrappedFunctionDescriptorWithContainerSource && descriptor.owner.parent !is IrClass) { + result.add(descriptor) + } + } + for (descriptor in propertySymbolTable.descriptorToSymbol.keys) { + if (descriptor is WrappedPropertyDescriptorWithContainerSource && descriptor.owner.parent !is IrClass) { result.add(descriptor) } } diff --git a/compiler/testData/codegen/box/arrays/indicesChar.kt b/compiler/testData/codegen/box/arrays/indicesChar.kt index adcd729e5e2..89959e1f0c9 100644 --- a/compiler/testData/codegen/box/arrays/indicesChar.kt +++ b/compiler/testData/codegen/box/arrays/indicesChar.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/casts/unitAsInt.kt b/compiler/testData/codegen/box/casts/unitAsInt.kt index 4e126703329..0b507550dc5 100644 --- a/compiler/testData/codegen/box/casts/unitAsInt.kt +++ b/compiler/testData/codegen/box/casts/unitAsInt.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt b/compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt index f530d79558d..c8f5169e0e4 100644 --- a/compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt +++ b/compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt b/compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt index 74fc5570f07..2cac6a3047e 100644 --- a/compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt +++ b/compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/classLiteral/java/javaReified.kt b/compiler/testData/codegen/box/classLiteral/java/javaReified.kt index 0e8c9608bfa..dc771d6855e 100644 --- a/compiler/testData/codegen/box/classLiteral/java/javaReified.kt +++ b/compiler/testData/codegen/box/classLiteral/java/javaReified.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/intrinsics/kt5937.kt b/compiler/testData/codegen/box/intrinsics/kt5937.kt index 1c87c0d9afd..cbb14f5ed5c 100644 --- a/compiler/testData/codegen/box/intrinsics/kt5937.kt +++ b/compiler/testData/codegen/box/intrinsics/kt5937.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt index 658d783c923..a61d790b09a 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt index bcf8d13fc9c..ee30fb69660 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME lateinit var bar: String diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt index 2a863b52a83..8c2daa422ae 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceTypeParameterIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceTypeParameterIndices.kt index 055a59665c7..a7848f3357e 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceTypeParameterIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceTypeParameterIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt index adb12406a24..0abd3451891 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt index f28047c7466..5ec23db0eea 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionTypeParameterIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionTypeParameterIndices.kt index ae2277e42e8..871f587f2ad 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionTypeParameterIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInCollectionTypeParameterIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt index f8ba9058848..67c2e3d2657 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt index e9c0f700da4..227e1d7f9e9 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt index 4ed9b82cb65..072bfe30db0 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt index 38522633738..662426c8e0c 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt b/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt index f2401d5962f..912dde44ea6 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt index 5f1b84ffec7..2d8a46e8175 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt index 4ea31790a75..9c2913aa99a 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt index 3a42ce871f0..4eaf3afe12a 100644 --- a/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt +++ b/compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt index e9d6e1f8529..7aea7662698 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt index 77c5d231f6b..529d5733a8c 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedArrayIndices.kt b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedArrayIndices.kt index 4d67595d04a..87ef2e80d99 100644 --- a/compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedArrayIndices.kt +++ b/compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedArrayIndices.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt b/compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt index 979d037b046..1026c9bafa6 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt b/compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt index 01d05ef9387..9d8f92903af 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt index 3f89530d4e6..8cf63fb13fe 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt index d7db3047a13..42fa223bf7a 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt index 1ffc5294036..8f9b44166c0 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt index 47158a09214..0a65f28a4ba 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/regressions/kt1568.kt b/compiler/testData/codegen/box/regressions/kt1568.kt index 5a2556ebf04..f084e0d58b1 100644 --- a/compiler/testData/codegen/box/regressions/kt1568.kt +++ b/compiler/testData/codegen/box/regressions/kt1568.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt2593.kt b/compiler/testData/codegen/box/regressions/kt2593.kt index 4dc82642c5a..ac11d12cc50 100644 --- a/compiler/testData/codegen/box/regressions/kt2593.kt +++ b/compiler/testData/codegen/box/regressions/kt2593.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt4259.kt b/compiler/testData/codegen/box/regressions/kt4259.kt index 3597fa0481b..103aaf8cebe 100644 --- a/compiler/testData/codegen/box/regressions/kt4259.kt +++ b/compiler/testData/codegen/box/regressions/kt4259.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt715.kt b/compiler/testData/codegen/box/regressions/kt715.kt index e7ef7f1391a..3898a6135cb 100644 --- a/compiler/testData/codegen/box/regressions/kt715.kt +++ b/compiler/testData/codegen/box/regressions/kt715.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt998.kt b/compiler/testData/codegen/box/regressions/kt998.kt index d8817300981..2996bbd148f 100644 --- a/compiler/testData/codegen/box/regressions/kt998.kt +++ b/compiler/testData/codegen/box/regressions/kt998.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/nestedIntersection.kt b/compiler/testData/codegen/box/regressions/nestedIntersection.kt index 133ac5bb865..6346d76c392 100644 --- a/compiler/testData/codegen/box/regressions/nestedIntersection.kt +++ b/compiler/testData/codegen/box/regressions/nestedIntersection.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/DIExample.kt b/compiler/testData/codegen/box/reified/DIExample.kt index 670d4b9d5aa..1515c8ccc42 100644 --- a/compiler/testData/codegen/box/reified/DIExample.kt +++ b/compiler/testData/codegen/box/reified/DIExample.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/arraysReification/jClass.kt b/compiler/testData/codegen/box/reified/arraysReification/jClass.kt index c33fe3f56df..472f86053ac 100644 --- a/compiler/testData/codegen/box/reified/arraysReification/jClass.kt +++ b/compiler/testData/codegen/box/reified/arraysReification/jClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt b/compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt index f9bce68a48c..50a0569287c 100644 --- a/compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt +++ b/compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/defaultJavaClass.kt b/compiler/testData/codegen/box/reified/defaultJavaClass.kt index 38e48c87777..2e256d33fe5 100644 --- a/compiler/testData/codegen/box/reified/defaultJavaClass.kt +++ b/compiler/testData/codegen/box/reified/defaultJavaClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/javaClass.kt b/compiler/testData/codegen/box/reified/javaClass.kt index ee67621f095..56a4fe7a85c 100644 --- a/compiler/testData/codegen/box/reified/javaClass.kt +++ b/compiler/testData/codegen/box/reified/javaClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt b/compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt index d9defaaf4bc..abaa5651861 100644 --- a/compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt +++ b/compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/ir/irText/expressions/classReference.fir.txt b/compiler/testData/ir/irText/expressions/classReference.fir.txt index 016551333e1..c9407ec9fd0 100644 --- a/compiler/testData/ir/irText/expressions/classReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/classReference.fir.txt @@ -25,4 +25,8 @@ FILE fqName: fileName:/classReference.kt GET_CLASS type=kotlin.reflect.KClass<.A> CONSTRUCTOR_CALL 'public constructor () [primary] declared in .A' type=.A origin=null CALL 'public final fun (): java.lang.Class> declared in kotlin.jvm' type=java.lang.Class<.A> origin=null + $receiver: GET_CLASS type=kotlin.reflect.KClass<.A> + GET_OBJECT 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit CALL 'public final fun (): java.lang.Class> declared in kotlin.jvm' type=java.lang.Class<.A> origin=null + $receiver: GET_CLASS type=kotlin.reflect.KClass<.A> + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .A' type=.A origin=null diff --git a/compiler/testData/ir/irText/expressions/objectClassReference.fir.txt b/compiler/testData/ir/irText/expressions/objectClassReference.fir.txt index a985a49d221..fb45386c92b 100644 --- a/compiler/testData/ir/irText/expressions/objectClassReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectClassReference.fir.txt @@ -23,3 +23,5 @@ FILE fqName: fileName:/objectClassReference.kt GET_CLASS type=kotlin.reflect.KClass<.A> GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A CALL 'public final fun (): java.lang.Class> declared in kotlin.jvm' type=java.lang.Class<.A> origin=null + $receiver: GET_CLASS type=kotlin.reflect.KClass<.A> + GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A