Skip to content

[cxx-interop] Fix import virtual methods with rvalue ref params #83453

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
Aug 1, 2025

Conversation

Xazax-hun
Copy link
Contributor

We generate forwarding calls for virutal methods. These forwarding calls had a type error when the original parameter had an rvalue reference type. In those scenarios we need to insert a static cast to make the type checker happy.

rdar://154969620

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Jul 31, 2025
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!

We generate forwarding calls for virutal methods. These forwarding calls
had a type error when the original parameter had an rvalue reference
type. In those scenarios we need to insert a static cast to make the
type checker happy.

rdar://154969620
@Xazax-hun Xazax-hun force-pushed the fix-rvalue-ref-virtual branch from 0fff0cf to 0877933 Compare August 1, 2025 16:26
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun enabled auto-merge August 1, 2025 16:27
@Xazax-hun Xazax-hun merged commit 6987ecd into main Aug 1, 2025
3 checks passed
@Xazax-hun Xazax-hun deleted the fix-rvalue-ref-virtual branch August 1, 2025 21:25
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