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

Apply @preconcurrency to typealiases at the point of use #60596

Merged
merged 3 commits into from
Aug 17, 2022

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Aug 17, 2022

When referencing a @preconcurrency typealias from code that does not
require strict concurrency, strip off @Sendable and global actor
types. This is consistent with references to functions/properties/etc.
that are @preconcurrency.

Fixes #60487, #60488., rdar://98343624.

…use.

When referencing a `@preconcurrency` typealias from code that does not
require strict concurrency, strip off `@Sendable` and global actor
types. This is consistent with references to functions/properties/etc.
that are `@preconcurrency`.

Fixes apple#60487, rdar://98343624.

(cherry picked from commit 5b88b96)
…ency` decls

When a `@preconcurrency` typealias is used within the type of a
`@preconcurrency` declaration, such as a function, do not strip
concurrency-related types, because the stripping will happen in the
outer declaration.

Fixes apple#60488.

(cherry picked from commit 2fbdad7)
(cherry picked from commit 5299326)
@DougGregor DougGregor requested a review from a team as a code owner August 17, 2022 16:30
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit fb5d544 into apple:release/5.7 Aug 17, 2022
@DougGregor DougGregor deleted the preconcurrency-typealias-5.7 branch August 17, 2022 22:46
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants