-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bitfield not rejected in type decl #1032
Comments
Since this is currently not supported without the validation users would see compiler errors. Closes #1032.
Instead of rejecting bitfields here, we should add proper support instead, see the first sketch here. |
As a workaround, one can put the type BF = unit {
x: bitfield(8) {
x1: 0..7;
};
} &convert=self.x;
public type X = unit {
x: BF;
}; |
This issue has been mentioned on Zeek. There might be relevant details there: https://community.zeek.org/t/internal-error-type-does-not-have-a-visitor/6856/2 |
I'll work on this, planing to make bitfields a full HILTI-side type with corresponding operations. |
Currently the following code passes validation, but fails with an internal error when compiled:
We should probably reject using a type decl with a
bitfield
during validation, or alternatively add proper support for it.The text was updated successfully, but these errors were encountered: