Skip to content

[cxx-interop] Fix the printing of types with generic arguments #75372

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
Jul 22, 2024

Conversation

Xazax-hun
Copy link
Contributor

Previously the code got the declaration for types with generic arguments and the printer used the declaration. This was a lossy operation, we printed the type with generic parameters instead of the arguments. This patch makes sure we print the type with the arguments. Unfortunately, the code structure is not the most clear, type printing is currently inherently part of the function signature printing. This code path needs to be factored out in the future to make the code easier to understand.

rdar://130679337

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Jul 19, 2024
Previously the code got the declaration for types with generic
arguments and the printer used the declaration. This was a lossy
operation, we printed the type with generic parameters instead of the
arguments. This patch makes sure we print the type with the arguments.
Unfortunately, the code structure is not the most clear, type printing
is currently inherently part of the function signature printing. This
code path needs to be factored out in the future to make the code easier
to understand.

rdar://130679337
@Xazax-hun Xazax-hun force-pushed the gaborh/fix-generic-arrays branch from 803839f to e195093 Compare July 22, 2024 11:42
@Xazax-hun Xazax-hun marked this pull request as ready for review July 22, 2024 11:43
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun merged commit a22dd98 into main Jul 22, 2024
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/fix-generic-arrays branch July 22, 2024 15:33
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