Skip to content

5.10: [interop][SwiftToCxx] ensure Swift generic types can be used as template parameters to other Swift generic types in C++ #69523

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

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Oct 30, 2023

Based on #69522, see last commit only for the diff - 1e75ae9
rdar://117015962

  • Explanation:
    C++ isUsableInGenericContext type trait in the generated header didn't correctly specialize for generic Swift types, leading to compile errors for users that exposed APIs that composed generic types of generic types, e.g. Optional<Array<Int>>. This change adds correct isUsableInGenericContext specialization for generic types.
  • Scope: C++ interop, generated header generator
  • Risk: Low, this just adds a specialization and fixes a user facing issue that right now manifests as unusable generated header.
  • Testing: Unit tests
  • Original PR: [interop][SwiftToCxx] ensure Swift generic types can be used as template parameters to other Swift generic types in C++ #69515

@hyp hyp added c++ interop Feature: Interoperability with C++ swift 5.10 labels Oct 30, 2023
@hyp hyp requested a review from a team as a code owner October 30, 2023 22:40
@hyp
Copy link
Contributor Author

hyp commented Oct 30, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Oct 31, 2023

@swift-ci please test windows platform

@hyp hyp merged commit 7b6f4f0 into swiftlang:release/5.10 Oct 31, 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++ swift 5.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants