Adding a new function to Enum module (isDefined) by Micha-kun · Pull Request #382 · fsprojects/FSharpx.Extras · GitHub
Skip to content

Adding a new function to Enum module (isDefined)#382

Merged
gdziadkiewicz merged 1 commit into
fsprojects:masterfrom
Micha-kun:master
May 6, 2020
Merged

Adding a new function to Enum module (isDefined)#382
gdziadkiewicz merged 1 commit into
fsprojects:masterfrom
Micha-kun:master

Conversation

@Micha-kun

Copy link
Copy Markdown
Contributor

When working with Enums in F#, I think it's interesting to have a function that checks if an Enum value is a valid Enum, specially for Flagged Enums. Searching I found this snippet (http://www.fssnip.net/4V/title/Check-if-value-is-a-valid-enum-or-flags-combination) and I think it would be interesting to be added in this library.

I added some tests using it.

Thank you

@Micha-kun

Copy link
Copy Markdown
Contributor Author

@Micha-kun

Copy link
Copy Markdown
Contributor Author

Seems like it still fails...

@panesofglass

Copy link
Copy Markdown
Contributor

Please update and try a new build.

@Micha-kun Micha-kun closed this Feb 5, 2020
@Micha-kun Micha-kun reopened this Feb 5, 2020
@Micha-kun

Copy link
Copy Markdown
Contributor Author

Woohoo!!

@gdziadkiewicz

Copy link
Copy Markdown
Collaborator

@panesofglass It looks like it builds. Would it make sense to merge this and release a new version?

Comment thread tests/FSharpx.Tests/EnumTest.fs
Comment thread tests/FSharpx.Tests/EnumTest.fs
@gdziadkiewicz

Copy link
Copy Markdown
Collaborator

@gdziadkiewicz gdziadkiewicz self-assigned this May 6, 2020
@gdziadkiewicz gdziadkiewicz merged commit 4985696 into fsprojects:master May 6, 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.

3 participants