Fixing the generics for merge and lift #860
Merged
+39
−143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've tracked down to two problems #858
The first is that lift wasn't quite right. I changed the lift argument from
Operator<R, T>
toOperator<? extends R, ? super T>
. Unfortunately Java won't let us hide that away in theOperator
class so we have to redeclare that everywhere in the debug hooks but it's still better than the alternative of having to use the fullFunc1<? extends Subscriber<? super R>, ? super Subscriber<? super T>>
everywhere.The second problem was in the return type of merge
Observable<T>
. Because of operators likemerge(Observable<? extends T> t1, Observable<? extends T> t2)
the only thing that can be said for the return type is that it is alsoObservable<? extends T>
but at the moment it is returningObservable<T>
.This pull request changes all of them and leads to some silly return values like