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

Allow existential opening for parameters of optional type. #61321

Merged

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Sep 27, 2022

Enable the opening of existential arguments when the corresponding parameter is optional, e.g.,

func f<T: P>(_: T?) { }

func g(p: any P) {
  f(p) // currently does not open p; with this change, open p
}

Potential amendment to SE-0352 is at swiftlang/swift-evolution#1797

@DougGregor DougGregor added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Sep 27, 2022
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please build toolchain

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor marked this pull request as ready for review October 25, 2022 20:14
@xwu xwu 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 Oct 26, 2022
@DougGregor DougGregor merged commit ed93529 into swiftlang:main Oct 27, 2022
@DougGregor DougGregor deleted the open-existential-for-optional-param branch October 27, 2022 03:54
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.

3 participants