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

Remove DAM annotations from enum converter #100347

Merged
merged 6 commits into from
Apr 5, 2024

Conversation

LakshanF
Copy link
Member

@LakshanF LakshanF commented Mar 27, 2024

Remove DAM annotations from Enum converter since the trimmer always preserve enums.

Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link
Contributor

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

@LakshanF LakshanF marked this pull request as ready for review March 28, 2024 21:18
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.

LGTM but I'd appreciate if @MichalStrehovsky could take a look too.

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.

Looks good from trimming perspective. Can't talk about TypeConverter or why we accept System.Enum (and whether this should accept all non-enums for the same reasons it accepts System.Enum).

{
if (!type.IsEnum && !type.Equals(typeof(Enum)))
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little bit concerned we have tests where this is used with a non-enum and it apparently works (System.Enum is really no different from just System.Object, or whatever).

@LakshanF LakshanF merged commit afbebfe into dotnet:main Apr 5, 2024
85 of 87 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
* Remove DAM annotations from enum converter

* expand the debug assert for enum types

* FB

* FB2
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 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.

5 participants