-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix nested choice when no struct/set present #169
Conversation
085ef7a
to
4e9f63e
Compare
Build seems to fail for third party issue: = note: /usr/local/lib/gcc/x86_64-unknown-netbsd/9.4.0/../../../../x86_64-unknown-netbsd/bin/ld: cannot find -lexecinfo
collect2: error: ld returned 1 exit status
error: could not compile `rasn-compiler` (bin "rasn-compiler") due to previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101. |
Thank you for your PR! I think the question I have is, is why is the variance wrong? If there's two variants, the variance should be two, not three. This PR solves this case, but doesn't really answer the root issue. |
The variance is correct but the range for constraint is incorrectly set because index starts from zero (classic). |
Ah gotcha, would you be able to make this a function? Having |
I added separate variable declaration and some comments. Also debug asserts that variance length should be always greater than 0, which in theory should be always greater, but no other checks. (You cannot pass variant if enum does not have one...). |
Thank you for your PR! |
Fixes #168