Skip to content

🍒[cxx-interop] Fix inadvertently renaming static method to Mutating #74572

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 21, 2024

Conversation

Xazax-hun
Copy link
Contributor

@Xazax-hun Xazax-hun commented Jun 20, 2024

Explanation:
When we have both const and non-const version of a function, we import
the non-cont version with the "Mutating" suffix. This logic, however, is
redundant for static member functions as those can never be marked as
"const" since they don't have a "self" or "this" to mutate. Importing static
methods with the wrong name is confusing, the users thought that the
static methods are not visible to swift.
Scope: C++ Interop
Risk: Low, only affects C++ interop and the change is straightforward.
Testing: Added a regression test.
Issue: rdar://120858502
Reviewer: @egorzhdan
Original PR: #74334

[cxx-interop] Fix inadvertently renaming static method to Mutating
@Xazax-hun Xazax-hun requested a review from a team as a code owner June 20, 2024 16:28
@Xazax-hun
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jun 20, 2024
Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

LGTM

@Xazax-hun Xazax-hun enabled auto-merge June 20, 2024 19:10
Copy link
Contributor

@ravikandhadai ravikandhadai 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 Gábor.

@Xazax-hun Xazax-hun merged commit 4869496 into release/6.0 Jun 21, 2024
5 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/name-collision-tests-cherry-pick branch June 21, 2024 15:18
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.

4 participants