-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan/Reduce Overloads & Type Erasure #1881
Comments
I'd be happy with |
BTW, if we do this, then we should consider generalizing to returning
|
This fixes the Java 8 ambiguity between the overloads: ReactiveX#1881
I have submitted #1883 to fix the ambiguity that happens with lambdas. I have changed |
I'm going to pull the factory overload until 1.1 so we make sure we get this right. |
This puts the seed factory on `collect` and removes it from `scan` and `reduce` due to ambiguity. See ReactiveX#1883 and ReactiveX#1881
Fixed in #1884 by deleting the ambiguous new factory overloads for |
I think the recent additions to
scan
/reduce
may cause issuesThe
Func0
passed in looks like it can be treated like anObject
and considered ambiguous and match withR
instead ofFunc0
.Here is a compilation error:
Here is example code: https://github.com/jhusain/learnrxjava/blob/master/src/main/java/learnrxjava/examples/ScanVsReduceExample.java
It looks like we need to do one of 3 things:
Rename one of them
Add an extra argument so arity solves it.
I actually think the most correct thing to do is remove
scan(R, Func2<R, ? super T, R>)
since an initial value is most often intended for mutable state inscan
/reduce
.cc @headinthebox as this is a last minute API fix we need prior to Monday for 1.0
The text was updated successfully, but these errors were encountered: