Skip to content

[SE-0470] Include isolated conformance checks for default value expressions #81451

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

DougGregor
Copy link
Member

  • Explanation: Include the checks for isolated conformances (SE-0470) when determining the isolation of a default value expression (SE-0411), rather than always emitting isolated-conformance diagnostics. This means that isolated conformances contribute to the isolation computed for a default value, which is especially important in default-main-actor mode, where more types (and therefore their conformances) are on the main actor.
  • Scope: Limited to the actor isolation checker, and only has any user-visible effect when isolated conformances are used either directly (e.g., @MainActor Codable) or through inference (InferIsolatedConformances or default main actor).
  • Issues: rdar://150691429
  • Original PRs: [SE-0470] Include isolated conformance checks for default value expressions #81450
  • Risk: Low due to the narrow scope, and fact that it depends on other new features to change behavior.
  • Testing: CI, side projects with default main-actor mode
  • Reviewers: (not yet)

…ssions

Per SE-0411, we compute the isolation of a default value expression
based on what isolation it requires. Include isolated conformance
checks in this computation, rather than always emitting diagnostics,
so that the combination of isolated default values + isolated
conformances works as expected.

Fixes rdar://150691429.
@DougGregor DougGregor requested a review from a team as a code owner May 12, 2025 17:00
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 601cde3 into swiftlang:release/6.2 May 13, 2025
5 checks passed
@DougGregor DougGregor deleted the isolated-conformances-in-default-value-expressions-6.2 branch May 13, 2025 04:29
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