[ObjCExport] Fix interface implementing interface

KT-66380
This commit is contained in:
eugene.levenetc
2024-03-06 16:12:29 +01:00
committed by Space Team
parent f18d00e6f0
commit aaea1d6af2
5 changed files with 77 additions and 4 deletions
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.backend.konan.objcexport.ObjCProtocol
import org.jetbrains.kotlin.backend.konan.objcexport.ObjCProtocolImpl
import org.jetbrains.kotlin.backend.konan.objcexport.toNameAttributes
import org.jetbrains.kotlin.objcexport.analysisApiUtils.getDeclaredSuperInterfaceSymbols
import org.jetbrains.kotlin.objcexport.analysisApiUtils.isObjCBaseCallable
import org.jetbrains.kotlin.objcexport.analysisApiUtils.isVisibleInObjC
context(KtAnalysisSession, KtObjCExportSession)
@@ -24,10 +25,10 @@ fun KtClassOrObjectSymbol.translateToObjCProtocol(): ObjCProtocol? {
// TODO: Check error type!
val name = getObjCClassOrProtocolName()
val members = getDeclaredMemberScope().getCallableSymbols()
val members = getCallableSymbolsForObjCMemberTranslation()
.filter { it.isObjCBaseCallable() }
.sortedWith(StableCallableOrder)
.mapNotNull { it.translateToObjCExportStub() }
.toList()
val comment: ObjCComment? = annotationsList.translateToObjCComment()