Skip to content

[SE-0411] Fixes for isolated default values. #69974

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

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Nov 18, 2023

  • Emit an error if a default initializer expression requires a different isolation than the corresponding stored property. This was already diagnosed for default arguments, but not for stored properties; the fix was to move the validation from checkDefaultArguments to DefaultInitializerIsolation::evaluate.
  • Add nonisolated to default and memberwise initializers when all initialized properties have Sendable type with nonisoalted default values.

…nitializers

should be nonisolated if all initialized properties are Sendable with nonisolated
default values.
@hborla
Copy link
Member Author

hborla commented Nov 18, 2023

@swift-ci please smoke test

1 similar comment
@hborla
Copy link
Member Author

hborla commented Nov 27, 2023

@swift-ci please smoke test

@hborla hborla merged commit bd61b66 into swiftlang:main Nov 27, 2023
@hborla hborla deleted the isolated-default-value-fixes branch November 27, 2023 20:51
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