Skip to content

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

Merged
hborla merged 1 commit intoswiftlang:release/6.0from
hborla:6.0-opaque-type-conformance-availability
May 17, 2024
Merged

[6.0][Availability] Diagnose unavailable conformances in UnderlyingToOpaqueExpr.#73697
hborla merged 1 commit intoswiftlang:release/6.0from
hborla:6.0-opaque-type-conformance-availability

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
@hborla hborla deleted the 6.0-opaque-type-conformance-availability branch May 17, 2024 17:17
@EMMWIS
Copy link

EMMWIS commented Mar 29, 2025

Zrzut ekranu_28-3-2025_231549_developer apple com

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.

3 participants