Skip to content

[cxx-interop] Fix unavailable generics triggering compilation error #74287

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
Jun 11, 2024

Conversation

Xazax-hun
Copy link
Contributor

In some cases, the reverse interop generated both a forward declaration and a definition with unavailable attribute in the C++ header. Unfortunately, the kinds of these symbol did not match. The forward declaration was templated while the definition was not. The forward declaration has the correct kind, so this patch extends the printing of unavailable definitions to include the generic arguments.

rdar://119835933

In some cases, the reverse interop generated both a forward declaration and a
definition with unavailable attribute in the C++ header. Unfortunately, the
kinds of these symbol did not match. The forward declaration was templated
while the definition was not. The forward declaration has the correct kind,
so this patch extends the printing of unavailable definitions to include the
generic arguments.

rdar://119835933
@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Jun 11, 2024
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan requested a review from ahatanaka June 11, 2024 13:38
Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@Xazax-hun Xazax-hun merged commit c2d6039 into main Jun 11, 2024
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/unavailable-generics branch June 11, 2024 16:26
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++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants