Skip to content

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
@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