diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrFunctionFactory.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrFunctionFactory.kt index d227543c509..dd2bae03b47 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrFunctionFactory.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrFunctionFactory.kt @@ -93,7 +93,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa override fun functionN(arity: Int, declarator: SymbolTable.((IrClassSymbol) -> IrClass) -> IrClass): IrClass { return functionNMap.getOrPut(arity) { symbolTable.declarator { symbol -> - val descriptor = symbol.descriptor as FunctionClassDescriptor + val descriptor = symbol.descriptor val descriptorFactory = FunctionDescriptorFactory.RealDescriptorFactory(descriptor, symbolTable) createFunctionClass(symbol, false, false, arity, irBuiltIns.functionClass, kotlinPackageFragment, descriptorFactory) } @@ -159,7 +159,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa abstract fun classReceiverParameterDescriptor(): ReceiverParameterDescriptor abstract fun FunctionDescriptor.memberReceiverParameterDescriptor(): ReceiverParameterDescriptor - class RealDescriptorFactory(private val classDescriptor: FunctionClassDescriptor, symbolTable: SymbolTable) : + class RealDescriptorFactory(private val classDescriptor: ClassDescriptor, symbolTable: SymbolTable) : FunctionDescriptorFactory(symbolTable) { override fun memberDescriptor(name: String, factory: (IrSimpleFunctionSymbol) -> IrSimpleFunction): IrSimpleFunctionSymbol { val descriptor = classDescriptor.unsubstitutedMemberScope.run { @@ -439,6 +439,7 @@ class IrFunctionFactory(private val irBuiltIns: IrBuiltIns, private val symbolTa descriptorFactory: FunctionDescriptorFactory ): IrClass { val name = functionClassName(isK, isSuspend, n) + if (symbol.isBound) return symbol.owner val klass = IrClassImpl( offset, offset, classOrigin, symbol, Name.identifier(name), ClassKind.INTERFACE, Visibilities.PUBLIC, Modality.ABSTRACT ) diff --git a/compiler/testData/codegen/box/funInterface/nonAbstractMethod.kt b/compiler/testData/codegen/box/funInterface/nonAbstractMethod.kt index 2b5a188c64a..b77615ddd35 100644 --- a/compiler/testData/codegen/box/funInterface/nonAbstractMethod.kt +++ b/compiler/testData/codegen/box/funInterface/nonAbstractMethod.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND_FIR: JVM_IR interface I { fun inherited(s: String): String = privateInherited(s) diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt index 7749511e5f6..3dee7701f44 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/functionAssertion.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // SKIP_JDK6 // TARGET_BACKEND: JVM // FILE: F.java diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/funInterface.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/funInterface.kt index 07ab0d8e77c..2bfcccf6100 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/funInterface.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/funInterface.kt @@ -1,6 +1,5 @@ // !JVM_DEFAULT_MODE: all-compatibility // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/funInterface.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/funInterface.kt index 1f4bb55a435..13d03169501 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/funInterface.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/funInterface.kt @@ -1,6 +1,5 @@ // !JVM_DEFAULT_MODE: all // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt b/compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt index e975af5d038..362479fb553 100644 --- a/compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt +++ b/compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM import java.io.* diff --git a/compiler/testData/codegen/box/sam/predicateSamWrapper.kt b/compiler/testData/codegen/box/sam/predicateSamWrapper.kt index 102fe13141b..ef7dc3f32ff 100644 --- a/compiler/testData/codegen/box/sam/predicateSamWrapper.kt +++ b/compiler/testData/codegen/box/sam/predicateSamWrapper.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FULL_JDK