-
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
Generic attributes handling in CustomAttributeDecoder #72561
Conversation
If the attribute constructor refers to the generic T in its signature, we would throw `BadImageFormatException`. This adds handling by capturing the generic context and interpreting the signature variables when needed.
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata Issue Details@MichalStrehovsky found that System.Reflection.Metadata doesn't handle generic attributes and have fixed in #57466 which needs unit tests added before merge I have cherry picked his commits and added unit test (I could not contribute to the original PR, got permission denied), probably we want it within 7.0 Fixes: #58073
|
src/libraries/System.Reflection.Metadata/tests/Metadata/Decoding/CustomAttributeDecoderTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
src/libraries/System.Reflection.Metadata/tests/Metadata/Decoding/CustomAttributeDecoderTests.cs
Outdated
Show resolved
Hide resolved
…etection.HasAssemblyFiles))]
@MichalStrehovsky found that System.Reflection.Metadata doesn't handle generic attributes and have fixed in #57466 which needs unit tests added before merge
I have cherry picked his commits and added unit test (I could not contribute to the original PR, got permission denied), probably we want it within 7.0
Fixes: #58073