Hi everyone, I have a sealed class named `Route` t...
# koin
l
Hi everyone, I have a sealed class named
Route
that I'm trying to inject. It works fine on Android, but on iOS, I get the following build error:
Copy code
error: Argument type mismatch: actual type is 'kotlin.Any', but 'dev.pinkroom.loyaltycardapp.presentation.core.navigation.Route' was expected.
error: Compilation finished with errors.
Here's the code I'm using for injection:
Copy code
val destinationModule = module {
    single<Route> { getInitialDestination(get()) }
}

private fun getInitialDestination(localPreferences: LocalPreferences) =
    localPreferences.getSession()?.let { Route.HomeScreen } ?: Route.WelcomeScreen
Does anyone know how to fix this? Any help is appreciated!
p
I this module defined where?
val destinationModule = module {
single<Route> { getInitialDestination(get()) }
}
l
In common main, this is a compose multiplatform project, the problem is not the module