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

[stdlib] using static method dispatch instead of failable casts #220

Closed
wants to merge 1 commit into from

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Dec 5, 2015

Overriding AnySequence.dropFirst and AnySequence.prefix to delegate
these operations to an underlying sequence, thus simplifying default
implementations in Sequence.

@moiseev
Copy link
Contributor Author

moiseev commented Dec 5, 2015

@gribozavr please have a look.

}


}
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra empty lines.

@moiseev
Copy link
Contributor Author

moiseev commented Dec 5, 2015

Updated.

S.SubSequence : SequenceType,
S.SubSequence.Generator.Element == Element,
S.SubSequence.SubSequence == S.SubSequence
>(_ base: S) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This changes the signature. We want to constrain SequenceType.SubSequence this way anyway, but don't have the necessary language feature. Nevertheless, this requires a writing a proposal in swift-evolution.

@gribozavr
Copy link
Contributor

The change LGTM, but because of the signature change in AnySequence.init(_:), this requires writing a proposal.

@gribozavr gribozavr added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Dec 5, 2015
@moiseev
Copy link
Contributor Author

moiseev commented Dec 5, 2015

Will do. Thanks for reviewing it.

Overriding `AnySequence.dropFirst` and `AnySequence.prefix` to delegate
these operations to an underlying sequence, thus simplifying default
implementations in `Sequence`.
@moiseev
Copy link
Contributor Author

moiseev commented Jan 6, 2016

Rebased and ready to go.
Removing the 'swift-evolution-pinding-discussion' label as it has recently been accepted here.

@moiseev moiseev added swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process and removed swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review labels Jan 6, 2016
@moiseev
Copy link
Contributor Author

moiseev commented Jan 6, 2016

Needs splitting.

@moiseev moiseev closed this Jan 6, 2016
@moiseev moiseev deleted the no-failable-cast branch January 6, 2016 20:36
slavapestov pushed a commit to slavapestov/swift that referenced this pull request Nov 27, 2018
…ext_for_key

Temporarily move dispatch_context_for_key test into the unreliable tests
dabelknap added a commit to dabelknap/swift that referenced this pull request Feb 13, 2019
maldahleh pushed a commit to maldahleh/swift that referenced this pull request Oct 26, 2020
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants