-
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
Some delegate invoke thunks fail to compile with where T : allows ref struct
delegates
#105029
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
These should not be getting the thunks. Unfortunately, we make this decision based on looking at the type definition, not the specific instantiated type, so we don't detect this new substitution possibility where we should: runtime/src/coreclr/tools/Common/TypeSystem/IL/DelegateInfo.cs Lines 137 to 139 in 66ae90f
I wonder if it would be easiest to just suppress this message and let it generate the throwing body. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
What's the priority on fixing this? Will this block a 9.0 scenario or is it just a spurious warning? |
… 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).
In a recent downstream merge, I noticed these when compiling S.R.Tests:
The text was updated successfully, but these errors were encountered: