-
Notifications
You must be signed in to change notification settings - Fork 62
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
Abiguous use of operator/function with enum #103
Comments
@BenchR267 enums with raw values are automatically Look for |
Ah thanks, that explains the message. In this case this works great, but I have another enum with a slightly more complex mapping logic. Is it somehow possible to overwrite the behaviour? |
I can't think of a way to do that short of what you're already doing (pull out the raw value and do the mapping). We would need to add something like this to achieve what you want: |
Yeah, that would solve this case. Thanks for your answers! I'll close this issue since my original question is answered. 😸 |
Hi!
I experienced a small problem when using enums as ValueTypes. I have an enum in a project defined as the following:
I implemented the ValueType extension as the following:
When using this in a type that has a
Week
property, I get the compiler error 'ambiguous use of X' where X is either <| or value(for:).I fixed it by using this code in my type that is using
Week
, but the solution is not that satisfiying. Do you have any other ideas?Thanks in advance!
The text was updated successfully, but these errors were encountered: