, 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
arnaud.giuliani
10/14/2019, 8:37 AM
about generic type, better is to use the definition through qualifiers
s
Sam
10/14/2019, 5:30 PM
@arnaud.giuliani: what do you mean ? Can you give me the link for this answer?