Hello everyone I read this question `<https://gith...
# koin
s
Hello everyone I read this question
<https://github.com/InsertKoinIO/koin/issues/471>
, but not work, so anyone have any solution for generic type ? Thanks
Copy code
LoginRepository extends BaseRepository

factory<BaseRepository> { LoginRepository(get()) }

abstract class BaseUseCase<R : BaseRepository> : KoinComponent {
    private val _repository: BaseRepository by inject()
    protected val repository: R
        get() {
            return _repository as R
        }
}
a
about generic type, better is to use the definition through qualifiers
s
@arnaud.giuliani: what do you mean ? Can you give me the link for this answer?
Do you mean this
<https://gist.github.com/magillus/07c6b188bafd927fe9944e049e7d8343>
a
yes, apparently