Skip to content
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

{Flowable,Observable}.collect(Collector) contravariant on T #7033

Merged
merged 1 commit into from Jul 28, 2020
Merged

{Flowable,Observable}.collect(Collector) contravariant on T #7033

merged 1 commit into from Jul 28, 2020

Conversation

cardamon
Copy link
Contributor

Added ? super twice. Would resolve #7032.

@akarnokd
Copy link
Member

Compilation errors:

> Task :compileJava
/home/travis/build/ReactiveX/RxJava/src/main/java/io/reactivex/rxjava3/core/Flowable.java:19807: error: cannot infer type arguments for FlowableCollectWithCollectorSingle<>
        return RxJavaPlugins.onAssembly(new FlowableCollectWithCollectorSingle<>(this, collector));
                                        ^
  reason: inferred type does not conform to equality constraint(s)
    inferred: CAP#1
    equality constraints(s): CAP#1,T
  where T is a type-variable:
    T extends Object declared in class Flowable
  where CAP#1 is a fresh type-variable:
    CAP#1 extends Object super: T from capture of ? super T
/home/travis/build/ReactiveX/RxJava/src/main/java/io/reactivex/rxjava3/core/Observable.java:16647: error: cannot infer type arguments for ObservableCollectWithCollectorSingle<>
        return RxJavaPlugins.onAssembly(new ObservableCollectWithCollectorSingle<>(this, collector));
                                        ^
  reason: inferred type does not conform to equality constraint(s)
    inferred: CAP#1
    equality constraints(s): CAP#1,T
  where T is a type-variable:
    T extends Object declared in class Observable
  where CAP#1 is a fresh type-variable:
    CAP#1 extends Object super: T from capture of ? super T
2 errors

@akarnokd akarnokd added this to the 3.1 milestone Jul 17, 2020
@cardamon
Copy link
Contributor Author

Hehe I thought I would get away with not even compiling the sources

@codecov
Copy link

codecov bot commented Jul 17, 2020

Codecov Report

Merging #7033 into 3.x will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #7033      +/-   ##
============================================
- Coverage     99.53%   99.47%   -0.06%     
+ Complexity     6670     6669       -1     
============================================
  Files           742      742              
  Lines         47270    47270              
  Branches       6373     6373              
============================================
- Hits          47048    47022      -26     
- Misses          102      112      +10     
- Partials        120      136      +16     
Impacted Files Coverage Δ Complexity Δ
.../main/java/io/reactivex/rxjava3/core/Flowable.java 100.00% <ø> (ø) 595.00 <0.00> (ø)
...ain/java/io/reactivex/rxjava3/core/Observable.java 100.00% <ø> (ø) 565.00 <0.00> (ø)
...a3/internal/jdk8/FlowableCollectWithCollector.java 100.00% <100.00%> (ø) 2.00 <1.00> (ø)
...ernal/jdk8/FlowableCollectWithCollectorSingle.java 100.00% <100.00%> (ø) 3.00 <1.00> (ø)
.../internal/jdk8/ObservableCollectWithCollector.java 100.00% <100.00%> (ø) 2.00 <1.00> (ø)
...nal/jdk8/ObservableCollectWithCollectorSingle.java 100.00% <100.00%> (ø) 3.00 <1.00> (ø)
...tivex/rxjava3/internal/jdk8/ParallelCollector.java 89.90% <0.00%> (-6.43%) 2.00% <0.00%> (ø%)
.../operators/observable/ObservableFlatMapSingle.java 94.44% <0.00%> (-3.18%) 2.00% <0.00%> (ø%)
...l/operators/observable/ObservableFlatMapMaybe.java 89.43% <0.00%> (-2.82%) 2.00% <0.00%> (ø%)
...a3/internal/subscribers/InnerQueuedSubscriber.java 97.72% <0.00%> (-2.28%) 16.00% <0.00%> (-1.00%)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e71c10...29e75e9. Read the comment docs.

@akarnokd akarnokd merged commit 5fefe60 into ReactiveX:3.x Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.x Consider making .collect contravariant on T
2 participants