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

Generic attributes handling in CustomAttributeDecoder #72561

Merged
merged 10 commits into from
Aug 9, 2022

Conversation

buyaa-n
Copy link
Member

@buyaa-n buyaa-n commented Jul 20, 2022

@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

MichalStrehovsky and others added 5 commits July 18, 2022 21:43
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.
@ghost
Copy link

ghost commented Jul 20, 2022

Tagging subscribers to this area: @dotnet/area-system-reflection-metadata
See info in area-owners.md if you want to be subscribed.

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

Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Metadata

Milestone: -

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thank you!

@buyaa-n buyaa-n added this to the 7.0.0 milestone Aug 8, 2022
@buyaa-n buyaa-n merged commit b947dd6 into dotnet:main Aug 9, 2022
@buyaa-n buyaa-n deleted the gen-attributes branch August 9, 2022 16:09
buyaa-n added a commit that referenced this pull request Aug 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2022
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.

System.Reflection.Metadata doesn't handle generic attributes
2 participants