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

Redeclare operations built on RACStream primitives with more precise type information (continued) #41

Merged
merged 1 commit into from
Nov 20, 2016

Conversation

erichoracek
Copy link
Contributor

@erichoracek erichoracek commented Nov 19, 2016

Redeclares operations built on RACStream primitives with more precise type information. This continues the work from #37 by adding the RACStream operators RACSequence, and updating RACStream methods to return __kindof RACStream.

This will allow lightweight generics to be added to RACSequence quite easily (following the same pattern as RACSignal), if desired.

I have verified that this fixes issue #40 by testing out the code in the issue. This is fixed by giving less precise type information to the RACSteam operator return values (__kindof RACStream *, rather than instancetype, as before), so that the compiler references the RACSignal version.

Additionally, I have verified that our large ReactiveCocoa 2.x codebase can be successfully migrated with these changes without any other issues like #40.

…type information (continued)

Redeclares operations built on RACStream primitives with more precise type information. This continues the work from ReactiveCocoa#37 by adding the RACStream operators RACSequence, and updating RACStream methods to return `__kindof RACStream`.

This will allow lightweight generics to be added to `RACSequence` quite easily (following the same pattern as RACSignal), if desired.

I have verified that this fixes issue ReactiveCocoa#40 by testing out the code in the issue. This is fixed by giving less precise type information to the `RACSteam` operator return values (`__kindof RACStream *`, rather than `instancetype`, as before), so that the compiler references the `RACSignal` version.
@erichoracek erichoracek mentioned this pull request Nov 19, 2016
@mdiep mdiep merged commit 1180ab2 into ReactiveCocoa:master Nov 20, 2016
@erichoracek erichoracek deleted the redeclare branch November 20, 2016 18:45
byohay pushed a commit to byohay/ReactiveObjC that referenced this pull request Dec 14, 2021
RACSignal+Operations: add -[RACSignal retry:when:]..
stuartofmine pushed a commit to stuartofmine/ReactiveObjC_2023 that referenced this pull request Oct 18, 2023
Redeclare operations built on RACStream primitives with more precise type information (continued)
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.

2 participants