-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Extend IL/ILAsm/ILDasm to represent attributes on type constraints #13005
Comments
That's going to be a bit annoying as the constraints are currently inlined in the generic parameter declaration. What about introducing a new .constraint keyword for scenarios where you want a custom attribute or do no want to add the constraint inline in the brackets?
.constraint could be limited to |
This is impacting source-build. We rely on round-tripping some assemblies using ildasm/ilasm to eliminate prebuilts. Not having the ability to round-trip these assemblies with nullable attributes will increasingly impact our ability to get to zero prebuilts, especially as usage of the nullable attribute increases. |
Ok I have implemented the following ildasm:
Produces this IL:
|
I don't believe this meets the bar for 3.0, so moving Milestone to 5.0. |
Example syntax:
|
Fixed with: Implement ilasm and ildasm support for .param constraint with Custom attributes dotnet/coreclr#26219 |
We have not yet discussed a specific proposal for how to represent this in IL. Tagging @RussKeldorph.
Relates to dotnet/roslyn#29997
The text was updated successfully, but these errors were encountered: