-
Notifications
You must be signed in to change notification settings - Fork 146
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
Non-literal values for ValueEnums don't work. #59
Comments
I suppose it's worth noting that it's not the intermediate class so much as the intermediate constructor that's doing it. This works, for example:
I'd hoped to hide the "val value" requirement was all. |
Unfortunately, there is currently a strict requirement to have the |
Alright, I'm using the phrasing in my second comment, I was just a little concerned that the "val value" was a bit of magic future maintainers might not notice. It's hard to decide between
and
Not a huge deal either way though. |
I'm converting some of my stuff to the StringEnumEntry, (Thanks!) and I'm noticing a few things I did earlier (With stock EnumEntry) that don't work with this. It's quite possible the answers will be "don't do that".
I'd set up an intermediate, non-sealed Entry-type class to attach some common methods to. The following doesn't compile:
The text was updated successfully, but these errors were encountered: