Skip to content

[5.9\[interop][SwiftToCxx] add additional type representation emission checks #65496

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 2 commits into from
May 1, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Apr 28, 2023

Explanation: Not all Swift enums types can be represented in C++ at the moment. This change ensures that both:

  • enums whose associated value is of protocol type.
  • enums whose associated value is from a dependent, not exposed Swift module
    Do not get exposed to C++.

Scope: Swift's and C++ interoperability, Header generator.
Risk: Low. This is not yet adopted.
Testing: Swift unit tests.
Reviewer: @ravikandhadai

hyp added 2 commits April 28, 2023 07:27
…ck for associated enum element types

This ensures that we do not try to emit enums whose associated values come from dependent modules that don't have a C++ representation
@hyp hyp added the c++ interop Feature: Interoperability with C++ label Apr 28, 2023
@hyp hyp requested a review from a team as a code owner April 28, 2023 14:31
@hyp
Copy link
Contributor Author

hyp commented Apr 28, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Apr 28, 2023

@swift-ci please test source compatibility

@hyp hyp merged commit f0aa860 into swiftlang:release/5.9 May 1, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants