[K/N] Fix: Ignore bridge functions in FunctionReferenceLowering

^KT-59858
This commit is contained in:
Dmitriy Dolovov
2023-07-04 18:20:33 +02:00
committed by Space Team
parent f3833fdcf8
commit 8aacdb471b
17 changed files with 109 additions and 1 deletions
@@ -343,7 +343,10 @@ internal class FunctionReferenceLowering(val generationState: NativeGenerationSt
val remappedSuperType = (samSuperType.classOrNull ?: error("Expected a class but was: ${samSuperType.render()}"))
.typeWith(samSuperType.remappedTypeArguments())
superTypes += remappedSuperType
transformedSuperMethod = remappedSuperType.classOrNull!!.functions.single { it.owner.modality == Modality.ABSTRACT }.owner
transformedSuperMethod = remappedSuperType.classOrNull!!.functions.single {
val function = it.owner
function.modality == Modality.ABSTRACT && function.origin !is DECLARATION_ORIGIN_BRIDGE_METHOD
}.owner
} else {
val numberOfParameters = unboundFunctionParameters.size
if (isSuspend) {