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

More preconcurrency fixes #73738

Merged
merged 2 commits into from
May 20, 2024

Conversation

DougGregor
Copy link
Member

Introduce more pre concurrency fixes:

  • Unify code paths for determining when @preconcurrency applies between SIL-based diagnostics and type checker diagnostics
  • Allow @preconcurrency to suppress a warning about a retroactive implied Sendable conformance.

Fixes rdar://125080066.

The "send non-Sendable" pass had a copy of the code for determining
what limit to put on the diagnostic behavior for a given reference to
a nominal type declaration. Rather than update that copy for the
recent changes to the canonical version of this in the type checker,
share the computation.
When a retroactive conformance to a protocol that inherits from `Sendable`
introduces an implicit `Sendable` conformance, allow `@preconcurrency`
to suppress the diagnostic about the `Sendable` conformance being
introduced outside of the original source file.

Fixes rdar://125080066.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit 6f969be into swiftlang:main May 20, 2024
3 checks passed
@DougGregor DougGregor deleted the more-preconcurrency-fixes branch May 20, 2024 01:30
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.

1 participant