Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Aug 20, 2023

These are contexts which would fail at runtime if a non-enum type is used; the constraint moves the error to compile-time.

@roji roji requested a review from ajcvickers August 20, 2023 08:21
@ajcvickers
Copy link
Contributor

Like the idea, but looks like there are build failures. Also, target rc2? (release-8.0)

@roji roji changed the base branch from main to release/8.0 August 20, 2023 08:36
@roji
Copy link
Member Author

roji commented Aug 20, 2023

@ajcvickers done, we still need the struct constraint in addition to Enum to exclude the System.Enum class.

@roji roji merged commit 4a976b7 into dotnet:release/8.0 Aug 20, 2023
@roji roji deleted the EnumConstraint branch August 20, 2023 09:55
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.

2 participants