Omar Mohamed
11/04/2018, 6:07 PMval networkDataSourceAdapter: RxNetworkDataSourceAdapter<out BeerListResponse<out List<Beer>>> = createNetworkDataSourceAdapter()
val cachedDataSourceAdapter: CachedDataSourceAdapter<List<Beer>,Beer> = getBeerLocalSource()
return FountainRx.createNetworkWithCacheSupportListing(
networkDataSourceAdapter = networkDataSourceAdapter,
cachedDataSourceAdapter = cachedDataSourceAdapter,
firstPage = FountainConstants.DEFAULT_FIRST_PAGE,
ioServiceScheduler = <http://Schedulers.io|Schedulers.io>(),
ioDatabaseScheduler = <http://Schedulers.io|Schedulers.io>(),
pagedListConfig = FountainConstants.DEFAULT_PAGED_LIST_CONFIG)
}
Using the out kotlin keyword to explicit the types, the error message is finally gone.
More info in this Kotlin Documentation page: https://kotlinlang.org/docs/reference/generics.html
Thanks anyway 🙂