-
Notifications
You must be signed in to change notification settings - Fork 73
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
Enumerated constraints appear broken #119
Comments
The second fprintf should execute but it doesn't as the second constraints check returns zero. |
While the following program does what I want, I don't know if it's architecturally correct. If it's not, it's a workaround for a bug. Otherwise, I'd recommend updating the user's guide to show three things:
|
Thinking about it a bit, there is an easy way to generate validators for enums that requires zero cleverness in the code generator--build a switch statement and avoid the difficulty of assembling a correct set of if statements.:
|
@bknotwell thanks for reporting. Would you consider submitting a PR? |
I'll take a look at the code. I suspect it'll be doable. |
To speed up merging of #121, could you please fix the CI, so it passes the tests? |
The NativeEnumerated_constraint is defined to asm_generic_no_constraint. Not sure if this is intentional or not but I've attached a minimal example below to illustrate the issue:
The text was updated successfully, but these errors were encountered: