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
Drop case in Refined #160
Drop case in Refined #160
Conversation
Btw, happy to iterate and tweak any minor detail, the intent of the change is my only goal. |
Let me know what you want to do in terms of bincompat.. |
MiMa complains about a lot of stuff that |
I'm happy to recover The other one that's a shot-call on your part - do you want to provide |
Yes, |
@fthomas Added |
Thanks @dwijnand! LGTM. So the only unsafe operations are now |
|
scala> val x: Int Refined Positive = 5
x: eu.timepit.refined.api.Refined[Int,eu.timepit.refined.numeric.Positive] = 5
scala> x.asInstanceOf[Int Refined Negative]
res0: eu.timepit.refined.api.Refined[Int,eu.timepit.refined.numeric.Negative] = 5 |
Right.. yeah, that one too :) |
Custom value classes don't have that problem. |
I'm wondering if we should make |
Can't have sealed value classes, as value classes are final. |
Good catch, @dwijnand. I've heard that the value class aspect of |
Maybe value classes should be allowed to nest... :D |
I heard that is an easy change in scalac ;-) |
.. with before-and-after (newly created) spec changes