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

Fix EqualToIncompatibleTypes for nullable enums #180

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

Dreamescaper
Copy link
Member

Fixes #179

Another small one :)

Problem that I've encountered was specifically about nullable enums.

Thing is that conversion from EnumOne? to EnumTwo? exists and it is NullableExplicit.
But it is same NullableExplcit for nullable to non-nullable type, e.g. EnumOne? -> EnumOne.

Therefore we cannot rely solely on conversion information, so I handle nullability case separately.

Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

Great work. Thanks for the PR.

@mikkelbu mikkelbu merged commit c23a96d into nunit:master Jan 10, 2020
@Dreamescaper Dreamescaper deleted the fix_nullable_enums branch January 10, 2020 23:45
@mikkelbu mikkelbu added this to the Release 0.2 milestone Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EqualToIncompatibleTypes should warn if two different enums compared
2 participants