Skip to content

Use proper "unsafe" context while binding type in explicit interface specifier#80610

Merged
AlekseyTs merged 2 commits intodotnet:mainfrom
AlekseyTs:Issue80565
Oct 13, 2025
Merged

Use proper "unsafe" context while binding type in explicit interface specifier#80610
AlekseyTs merged 2 commits intodotnet:mainfrom
AlekseyTs:Issue80565

Conversation

@AlekseyTs
Copy link
Contributor

Fixes #80565.

@AlekseyTs AlekseyTs requested a review from a team as a code owner October 9, 2025 16:51

class PointerImpl : IPointerTest
{
unsafe void ITest<void*[]>.Method()
Copy link
Member

Choose a reason for hiding this comment

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

Are there any tests without unsafe here verifying we report an error?

Copy link
Contributor Author

@AlekseyTs AlekseyTs Oct 9, 2025

Choose a reason for hiding this comment

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

Are there any tests without unsafe here verifying we report an error?

Probably. It was easier for me to add new ones.

@AlekseyTs AlekseyTs requested a review from 333fred October 9, 2025 23:04
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For a second review

comp.VerifyDiagnostics();
}

[Fact]
Copy link
Member

Choose a reason for hiding this comment

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

Consider adding WorkItem attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsafe context required on an explicit interface implementation with pointers in the interface type parameters despite being marked unsafe

4 participants