I’ve just learnt RxJava with Kotlin.
Today I found a problem.
Simplify the code is:
Observable.range(1, 10)
.retryWhen { attempts ->
attempts.flatMap { error ->
Observable.error(error)
}
}
The error
value-parameter here is Any?
in Kotlin.
But in Java:
Observable.range(1, 10)
.retryWhen(attempts ->
attempts.flatMap(error ->
Observable.error(error)
)
);
The error
value-parameter is ? extends Throwable
here in Java.
Is it a bug?