-
Notifications
You must be signed in to change notification settings - Fork 638
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
Type Inference fails in Kotlin #44
Comments
I've not been using Kotlin myself, but if you submit a pull request I'll gladly take it. |
Sorry, I do not do PR's on GitHub, but the change is just a global search and replace of "Transformer<T, T>" and replacing that with "Transformer<? super T, ? extends T>" |
Your boycotting comes off as "I don't want to do the work myself." |
My boycotting is the fact that GitHub should be just about technology and be politically neutral, but it instead decided to promote an offensive political agenda. Therefore I can no longer in good conscience support them with my code. Note I also boycotted Stack Overflow for the same reason no longer have an account there and filter SO results from my search queries. I'd be happy to submit a patch file or host the change on GitLab, but most people are not happy with that. |
Could you please provide a link to GitHub's/Stack Overflow's offensive political agenda? I'm not aware of that. Thx. |
You're not boycotting GitHub if you're just getting other people to make changes for you. You're submitting changes by proxy. |
...Not to mention the obvious, which is that the existence of this issue calls into question whether this is a boycott or a dodge for doing work. |
I don't want to get into the specifics of their political agenda because unlike GitHub I am not trying to promote a political agenda here and don't want to see this devolve into a political debate. My point is that Github should have been politics free, but they crossed a line To understand my position, just pick your own hot button political issue that you feel passionately about. Now imagine how you would feel if Github changed the logo at the top of every page, including YOUR OWN pages, to show support for the opposite opinion of your own. The particular issue itself is not as important as the fact that Github should be just about tech, not politics. While I refuse to support Github itself directly with my own code, I am not boycotting the people like you that use GitHub and the projects they create. I maintain an identity primarily so that I can support them with issue reports to make their software better. If GitHub could accept PRs from other repos, like GitLab I would gladly do it. I am sorry, but I have to draw the line somewhere. |
When attempting to use RxLifecycle from Kotlin in an Observable chain the compiler cannot infer types in some cases unless explicitly specified.
Consider if I have a variable tasks of type Observable<List>
If I try to use that in an observable chain:
The compiler complains that it cannot infer the type unless I explicitly specify it as in:
I think the problem is that you are not explicitly bounding the generic type to match the compose method. You have the method returning
And I think that should really be:
to match the semantics of the Observable.compose method.
I tested by writing a wrapper method that uses the latter return type and it fixes the type inference.
The text was updated successfully, but these errors were encountered: