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

Support field access on variables of type Enum #105524

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Jul 25, 2024

Follow-up to #105351

This adds support for the case when a variable is of type Enum and there are no generics involved, so the following no longer produces trim warnings:

static void M(Enum v) {
    v.GetType().GetFields();
}

Fixes #105506

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Jul 25, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@sbomer
Copy link
Member Author

sbomer commented Jul 26, 2024

/ba-g "unrelated timeout in Workloads-NoFingerprint-ST-Wasm.Build.Tests"

@sbomer sbomer merged commit 7102706 into dotnet:main Jul 26, 2024
106 of 112 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting Enum fields/attributes in trimmed and AOT'd applications
3 participants