Navigation Menu

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

Fix the compose generics #1701

Merged
merged 2 commits into from Oct 2, 2014
Merged

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Sep 24, 2014

No description provided.

@SuppressWarnings("unchecked")
public <R> Observable<R> compose(Transformer<? super T, ? extends R> transformer) {
// Casting to Observable<R> is type-safe because we know Observable is covariant.
return (Observable<R>) transformer.call(this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah interesting. This never worked for me, so you're just doing it via a cast and forcing it.

@benjchristensen
Copy link
Member

Thank you @zsxwing ... I guess one of @headinthebox or I owes you a drink! Now to figure out how to get to you in China.

benjchristensen added a commit that referenced this pull request Oct 2, 2014
@benjchristensen benjchristensen merged commit ea0173c into ReactiveX:0.20.x Oct 2, 2014
@zsxwing
Copy link
Member Author

zsxwing commented Oct 3, 2014

Buy one when you get a chance to visit China or when I visit Bay Area :)

@zsxwing zsxwing deleted the compose-generics branch October 3, 2014 14:27
@benjchristensen
Copy link
Member

Sounds good. I'd love to get to China at some point.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants