Skip to content

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.

@dotnet-policy-service
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 <[email protected]>
@jtschuster jtschuster merged commit 36a85b0 into dotnet:main May 30, 2024
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