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

Do not emit unsupported thunks for delegates with allows ref struct generics #105871

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

MichalStrehovsky
Copy link
Member

Fixes #105029

I looked into redoing delegate thunk management to be per instance but that would be an unnecessarily big diff. Instead adding a facility to allow ILStubMethodIL specialize per-instance if needed and in this specialization generate a throwing method body (that should be unreachable at runtime).

Cc @dotnet/ilc-contrib

… generics

Fixes dotnet#105029

I looked into redoing delegate thunk management to be per instance but that would be an unnecessarily big diff. Instead adding a facility to allow `ILStubMethodIL` specialize per-instance if needed and in this specialization generate a throwing method body (that should be unreachable at runtime).
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@MichalStrehovsky MichalStrehovsky merged commit 018fb9d into dotnet:main Aug 5, 2024
88 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix105029 branch August 5, 2024 06:34
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 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.

Some delegate invoke thunks fail to compile with where T : allows ref struct delegates
2 participants