Skip to content
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

Propagate the 'this' keyword in LibraryImports #102793

Merged
merged 3 commits into from
May 30, 2024

Conversation

jtschuster
Copy link
Member

Fixes #102690

Since Roslyn just lowers the extension methods to a call to the static method there's no reason we shouldn't support creating extension methods that are also LibraryImport methods. This adds the IsExplicitThis property to TypePositionInfo and copies this to the generated signature if it is true.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

…erop.SourceGeneration/Marshalling/MarshallerHelpers.cs

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
@jtschuster jtschuster merged commit 36a85b0 into dotnet:main May 30, 2024
93 checks passed
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
Since Roslyn just lowers the extension methods to a call to the static method there's no reason we shouldn't support creating extension methods that are also LibraryImport methods. This adds the IsExplicitThis property to TypePositionInfo and copies this to the generated signature if it is true.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LibraryImport do not copy this
3 participants