I'm having a strange iOS `IrLinkageError` with an ...
# compose-ios
t
I'm having a strange iOS
IrLinkageError
with an implemented Composable interface method in a class with an associated YouTrack issue with the full stacktrace. Given the the following interface and implementation crashes at runtime on iOS saying:
Copy code
kotlin.internal.IrLinkageError: Abstract function 'PaneSharedElement' is not implemented in non-abstract class 'ThreePaneSharedTransitionScope'
Copy code
@Stable
interface PaneSharedTransitionScope<Pane, Destination : Node> :
    PaneScope<Pane, Destination>,
    SharedTransitionScope {
    
    @Composable
    fun PaneSharedElement(
        modifier: Modifier = Modifier,
        sharedContentState: SharedTransitionScope.SharedContentState,
        boundsTransform: BoundsTransform = Defaults.DefaultBoundsTransform,
        placeholderSize: SharedTransitionScope.PlaceholderSize = ContentSize,
        renderInOverlayDuringTransition: Boolean = true,
        zIndexInOverlay: Float = 0f,
        clipInOverlayDuringTransition: OverlayClip = Defaults.ParentClip,
        content: @Composable MinConstraintBoxScope.() -> Unit,
    )
}
Implementation:
Copy code
@Stable
private class ThreePaneSharedTransitionScope<Destination : Node>(
    val paneScope: PaneScope<ThreePane, Destination>,
    val sharedTransitionScope: SharedTransitionScope,
) : PaneSharedTransitionScope<ThreePane, Destination>,
    PaneScope<ThreePane, Destination> by paneScope,
    SharedTransitionScope by sharedTransitionScope {

    @Composable
    override fun PaneSharedElement(
        modifier: Modifier,
        sharedContentState: SharedTransitionScope.SharedContentState,
        boundsTransform: BoundsTransform,
        placeholderSize: SharedTransitionScope.PlaceholderSize,
        renderInOverlayDuringTransition: Boolean,
        zIndexInOverlay: Float,
        clipInOverlayDuringTransition: OverlayClip,
        content: @Composable MinConstraintBoxScope.() -> Unit,
    ) = when (val pane = paneState.pane) {
        null -> throw IllegalArgumentException(
            "Shared elements may only be used in non null panes",
        )
        // Allow movable shared elements in the primary pane only
        ThreePane.Primary,
        ThreePane.Secondary,
        -> SharedElement(...)
        // In the other panes use the element as is
        ThreePane.Tertiary,
        ThreePane.Overlay,
        -> MinConstraintBox(modifier) {
            content()
        }
    }
}