I believe I’ve discovered the issue. I have a property declared like:
var positiveButton: (Pair<@Composable () -> String, T>)? = null
Usually, I assign it like:
positiveButton = @Composable { stringResource(id = labelResId) } to value
But sometimes like:
positiveButton = { label } to value
and that is what is causing the crash.
Instead, I just need to assign like:
positiveButton = @Composable { label } to value
Surely this is a bug? Either the compiler should pick it up, or the runtime should allow it.