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

add no-op constructor for VersionNumber(::VersionNumber) #45052

Merged
merged 2 commits into from May 2, 2022

Conversation

kleinschmidt
Copy link
Contributor

This adds a constructor for VersionNumber(v::VersionNumber) = v. The constructor is currently quite convenient: given just about anything it'll return a version number for you. The one exception is that given a version number, it'll error. So we're forced to do things like

to_version(v) = VersionNumber(v)
to_version(v::VersionNumber) = v

which feels less than ideal.

@ericphanson
Copy link
Contributor

This would be useful! UUIDs got an idempotent constructor in #36018, as a bit of precedent

@StefanKarpinski StefanKarpinski merged commit afa0406 into JuliaLang:master May 2, 2022
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.

None yet

3 participants