I get an issue when compiling my multiplatform pro...
# ios
m
I get an issue when compiling my multiplatform project for iOS specifically. This error occurs during compilation:
Copy code
error: java.lang.IllegalStateException: no implementation for FUN MISSING_DECLARATION name:<get-icon> visibility:public modality:FINAL <> () returnType:kotlin.Nothing
in <package>.ChatTab
    at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.findImplementation(ObjCExportCodeGenerator.kt:1795)
	at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createDirectAdapters$getAllRequiredDirectAdapters(ObjCExportCodeGenerator.kt:1781)
	at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createDirectAdapters(ObjCExportCodeGenerator.kt:1787)
    (+ a lot of further lines)
This is the code that triggers it I think:
Copy code
class ChatTab : Tab {
    override val options: TabOptions
        @Composable
        get() {
            val icon = rememberVectorPainter(Icons.Default.Chat)

            return remember {
                TabOptions(
                    index = 0u,
                    title = "Chat",
                    icon = icon
                )
            }
        }

    @Composable
    override fun Content() {

    }
}
The error message seems to imply that the error comes from the getter of the
icon
property, which is defined in the parent interface (part of the Voyager library):
Copy code
@Deprecated(
    message = "Use 'options' instead. Will be removed in 1.0.0.",
    replaceWith = ReplaceWith("options")
)
public val icon: Painter?
    @Composable get() = options.icon
The issue does not occur when compiling for Android. What is confusing to me is that the error message seems to make some wrong assumptions about the getter? Since it comes from an interface it can't be
final
and the return type is also not
Nothing
.