Skip to content

[NFC] BitwiseCopyable: Use getKnownProtocolKind. #71468

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

Conversation

nate-chandler
Copy link
Contributor

Rather than getting ahold of the BitwiseCopyable protocol and doing a pointer comparison to another ProtocolDecl, check whether the latter's known protocol kind is ::BitwiseCopyable.

It makes sense to form an existential of a type that conforms to
`BitwiseCopyable` but such an existential is not itself trivial and
consequently not `BitwiseCopyable`.
Rather than getting ahold of the BitwiseCopyable protocol and doing a
pointer comparison to another ProtocolDecl, check whether the latter's
known protocol kind is ::BitwiseCopyable.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review February 8, 2024 21:33
@nate-chandler nate-chandler merged commit f9e6478 into swiftlang:main Feb 8, 2024
@nate-chandler nate-chandler deleted the nfc/20240208/1/bitwise-copyable-known-protocol-kind branch February 8, 2024 21:34
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