Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

Fixes #97737.

Trimming ensures we keep all the public fields on enums. typeof(T).GetFields() is safe when the T is constrained to be System.Enum or a derived type.

Cc @dotnet/ilc-contrib

Fixes dotnet#97737.

Trimming ensures we keep all the public fields on enums. `typeof(T).GetFields()` is safe when the `T` is constrained to be `System.Enum` or a derived type.
Copy link
Member

@sbomer sbomer left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

@MichalStrehovsky MichalStrehovsky merged commit 3462976 into dotnet:main Apr 9, 2024
@MichalStrehovsky MichalStrehovsky deleted the fix97737 branch April 9, 2024 21:06
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…#100814)

Fixes dotnet#97737.

Trimming ensures we keep all the public fields on enums. `typeof(T).GetFields()` is safe when the `T` is constrained to be `System.Enum` or a derived type.
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 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.

Respecting EnumMemberAttribute in AOT'd applications

3 participants