Anyone know why kotlin isn’t picking up my User in...
# announcements
r
Anyone know why kotlin isn’t picking up my User interface on LoginUserV1?
m
Does
LoginUserV1
implement the
User
interface?
r
of course marius
Screen Shot 2020-06-15 at 8.44.28 AM.png
m
👍 Could you try changing the return type of the function to
Single<out User>
?
r
seems like its good
thanks
a
Single<out X>
also has some limitations. E.g. you won't be able to use operators where
X
is used as input, e.g. the following will not be possible:
Copy code
fun foo(user: Single<out User>) {
    user.concatWith(/*SingleSource<out Nothing> is expected*/)
}
I wrote an article about it a while ago: https://badootech.badoo.com/reaktive-a-multiplatform-library-for-reactive-kotlin-android-ios-77b6ff25adb1
r
I may do the cast still, it’s only in 2 places.
a
Yeah but I believe it will be an unsafe cast and you will have warnings.