-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Bad error message when matching on a struct in a union #2000
Comments
You want your object to be a I'll keep the issue open for the error message. |
@Praetonus Thanks for the quick response. I'll refactor my code accordingly. |
What should the error message for this be? |
It should be something like |
Use case: I'm working with FFI calls where an argument can either be a pointer to a struct or NULL (where it will then use defaults). I set up a variable as either
(struct | None)
but I'm running into a compiler error when trying to craft the appropriateMaybePointer
(I get a similar error when trying to cast it with anas
also). It is quite possible that I'm going about this the wrong way (in which case a pointer in the right direction would be appreciated).Pony Playpen link: http://pony-playpen.lietar.net/?gist=4d388470321b9585cbb33f22f9578b74
Code:
Error:
The text was updated successfully, but these errors were encountered: