Skip to content

[Sema] Let protocols define getter requirements for @_staticExclusiveOnly types #74901

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 5 commits into from
Jul 3, 2024

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jul 2, 2024

Variable requirements in protocols must always be spelled out with var, so we weren't allowing types like Atomic to be a protocol requirement even if the protocol only requires a getter. Lets allow protocol contexts to define getter requirements and error if they have a setter.

Resolves: rdar://130447812

@Azoy Azoy requested review from hborla, slavapestov and xedin as code owners July 2, 2024 17:37
@Azoy
Copy link
Contributor Author

Azoy commented Jul 2, 2024

@swift-ci please smoke test

Copy link
Contributor

@tshortli tshortli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks good. Missing clang-format, though.

@Azoy
Copy link
Contributor Author

Azoy commented Jul 2, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented Jul 2, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented Jul 2, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented Jul 3, 2024

@swift-ci please smoke test

@Azoy Azoy merged commit 427077b into swiftlang:main Jul 3, 2024
3 checks passed
@Azoy Azoy deleted the static-exclusive-requirements branch July 3, 2024 21:33
Azoy added a commit that referenced this pull request Jul 17, 2024
[Sema] Let protocols define getter requirements for @_staticExclusiveOnly types
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