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

[6.0][Availability] Diagnose unavailable conformances in UnderlyingToOpaqueExpr. #73697

Merged

Conversation

hborla
Copy link
Member

@hborla hborla commented May 17, 2024

  • Explanation: The compiler was not diagnosing unavailable conformances used for opaque result types. This changes the availability checker to check substitution maps of underlying values for opaque result types to diagnose unavailable conformances. This change also makes sure Sendable availability diagnostics are errors in Swift 6 mode.
  • Scope: Impacts opaque result types whose underlying types have unavailable conformances or missing Sendable conformances.
  • Issue: rdar://125421098, Opaque return type sendability checking hole #72926
  • Risk: Low. This could cause some miscompiling code to fail to build, but the most likely case of code violating these rules is for Sendable, which is staged in as a warning until Swift 6 mode.
  • Testing: Added new tests.
  • Reviewer: @slavapestov @tshortli
  • Main branch PR: [Availability] Diagnose unavailable conformances in UnderlyingToOpaqueExpr. #73695

…eExpr.

Change the availability checker to check substitution maps of underlying
values for opaque result types to diagnose unavailable conformances. This
change also makes sure `Sendable` availability diagnostics are errors in
Swift 6 mode.

(cherry picked from commit 1ec5808)
@hborla hborla requested a review from a team as a code owner May 17, 2024 06:10
@hborla
Copy link
Member Author

hborla commented May 17, 2024

@swift-ci please test

@hborla hborla merged commit a87fdfc into swiftlang:release/6.0 May 17, 2024
5 checks passed
@hborla hborla deleted the 6.0-opaque-type-conformance-availability branch May 17, 2024 17:17
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