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 unapply method to RefinedTypeOps #165

Closed
Iltotore opened this issue Aug 28, 2023 · 0 comments · Fixed by #167
Closed

Add unapply method to RefinedTypeOps #165

Iltotore opened this issue Aug 28, 2023 · 0 comments · Fixed by #167
Labels
enhancement New feature or request
Milestone

Comments

@Iltotore
Copy link
Owner

Add an unapply method to RefinedTypeOps to allow pattern matching on new types:

opaque type Temperature = Int :| Positive
object Temperature extends RefinedTypeOps[Temperature]
val temperature: Temperature = ???
temperature match
  case Temperature(value) =>
@Iltotore Iltotore added the enhancement New feature or request label Aug 28, 2023
@Iltotore Iltotore added this to the 2.3.0 milestone Aug 28, 2023
@Iltotore Iltotore linked a pull request Sep 4, 2023 that will close this issue
@Iltotore Iltotore closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant