Tunji Dahunsi
03/02/2026, 3:10 PMIrLinkageError 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:
kotlin.internal.IrLinkageError: Abstract function 'PaneSharedElement' is not implemented in non-abstract class 'ThreePaneSharedTransitionScope'
@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:
@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()
}
}
}