-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/9.0] Switch SwiftSelf<T>
position requirement to last
#108856
Conversation
This is added as the last parameter by the Swift compiler, so to support instance calls taking parameters this needs to come last.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. we will take for consideration in 9 GA
#108547 is not merged yet, but I expect to merge it soon once CI is sorted out. In the mean time I am just getting this all ready to merge as well in light of the snap tomorrow. |
Backport of #108547 to release/9.0
/cc @jakobbotsch
Customer Impact
Interop with instance methods on Swift structs that have any parameters is impossible. Currently Mono and CoreCLR enforce the "self" parameter to be first, but the Swift compiler requires it to be last.
This results in incompatible signatures that makes interop not work in this scenario.
Note that there is still a known issue with Mono's handling; see #108855. We expect to fix this in servicing if it ends up impacting user scenarios.
Regression
Swift interop is new in .NET 9.
Testing
Tests with instance methods that have parameters are added as part of the PR.
Risk
Low. Swift interop is new in .NET 9.