Skip to content

[5.9] Sema: Diagnose @backDeployed on functions with opaque result types #66677

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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jun 15, 2023

  • Explanation: The compiler does not yet implement support for back deploying opaque result types so we need to diagnose attempts to use the attribute to prevent broken back deployments. @_alwaysEmitIntoClient works as an alternative.
  • Scope: Narrow. Only affects type checking for the @backDeployed attribute.
  • Issues: rdar://110806234
  • Risk: Low.
  • Testing: Regression tests added.
  • Reviewers: @beccadax
  • Main branch PR: Sema: Diagnose @backDeployed on functions with opaque result types #66673.

Sometimes it's useful to be more lenient when type checking swiftinterfaces
since restrictions that could be dropped in the future will manifest in
resilient libraries being incompatible with older compilers otherwise.
@tshortli tshortli force-pushed the diagnose-back-deployed-opaque-result-types-5.9 branch from 740a319 to 818ec1e Compare June 15, 2023 18:20
@tshortli
Copy link
Contributor Author

@swift-ci please test

The compiler does not yet implement support for back deploying opaque result
types.

Resolves rdar://110806234
@tshortli tshortli force-pushed the diagnose-back-deployed-opaque-result-types-5.9 branch from 818ec1e to a9449e5 Compare June 15, 2023 23:09
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli changed the title Sema: Diagnose @backDeployed on functions with opaque result types [5.9] Sema: Diagnose @backDeployed on functions with opaque result types Jun 15, 2023
@tshortli tshortli added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jun 15, 2023
@tshortli tshortli marked this pull request as ready for review June 16, 2023 04:59
@tshortli tshortli requested a review from a team as a code owner June 16, 2023 04:59
@tshortli tshortli merged commit b8dade6 into swiftlang:release/5.9 Jun 16, 2023
@tshortli tshortli deleted the diagnose-back-deployed-opaque-result-types-5.9 branch June 16, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants