On line 11 I am getting `type inference failed not...
# android
z
On line 11 I am getting
type inference failed not enough information fun<T: Any!> error( exception: Throwable!): Single<T!>!
d
pls, replace first string and database[id] fo val elt = database[id] ?: return Single.error(Throwable(“Not found”))
database[id]!! is very bad case
z
thank you. Will keep that in mind. The main problem is it's not compiling in flatmap returning
return@flatMap Single.error(Throwable(""))
giving error
d
Is it fine with
Single.error<User>
and/or
Single.just(database[0]!!)
?
💯 2
z
now working with
Single.error<User>
d
I don’t understand, why do i need use flatmap in this example
z
Hi see the new question