Skip to content

[embedded] Adjust docs to clarify support for class-bound existentials #76768

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 1 commit into from
Oct 1, 2024

Conversation

kubamracek
Copy link
Contributor

No description provided.

@kubamracek
Copy link
Contributor Author

@swift-ci please smoke test

@@ -183,7 +183,7 @@ Embedded Swift is a subset of the Swift language, and some features are not avai
Features that are not available:

- **Not available**: Runtime reflection (`Mirror` APIs).
- **Not available**: Values of protocol types ("existentials"), e.g. `let a: Hashable = ...`, are not allowed. `Any` and `AnyObject` are also not allowed.
- **Not available**: Values of protocol types ("existentials"), unless the protocol is restricted to be class-bound (derived from AnyObject). E.g. `let a: Hashable = ...` is not allowed. `Any` is also not allowed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the restriction really on the protocol, or just the existential type? That is, do we allow any Hashable & AnyObject, any Hashable & SomeClassBoundProtocol, or any Hashable & SomeClass?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is really on the protocol - at least currently.

@kubamracek kubamracek merged commit eb2b522 into swiftlang:main Oct 1, 2024
3 checks passed
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.

4 participants