Skip to content
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

Field from anonymous bitfield in other unit not resolved #1533

Closed
Tracked by #1481
bbannier opened this issue Sep 21, 2023 · 1 comment · Fixed by #1537
Closed
Tracked by #1481

Field from anonymous bitfield in other unit not resolved #1533

bbannier opened this issue Sep 21, 2023 · 1 comment · Fixed by #1537
Assignees
Labels
Bug Something isn't working

Comments

@bbannier
Copy link
Member

If a bitfield field was lifted into its unit we do not find it when operating from a different unit.

module foo;

type X = unit {
    : bitfield(8) {
        a: 0..7;
    };
};

type Y = unit(x: X) {
    on %init { print x.a; }
};
$ spicyc -dj foo.spicy
[error] foo.spicy:10:22: type does not have field 'a'
[error] spicyc: aborting after errors
@bbannier bbannier added the Bug Something isn't working label Sep 21, 2023
@bbannier bbannier mentioned this issue Sep 21, 2023
9 tasks
@bbannier
Copy link
Member Author

@rsmmr I added this to the bitfield tracking ticket so we can make sure to get to it before zeek-6.1.

@rsmmr rsmmr self-assigned this Sep 22, 2023
@rsmmr rsmmr closed this as completed in 5ca1c94 Sep 22, 2023
rsmmr added a commit that referenced this issue Sep 22, 2023
* origin/topic/robin/gh-1533-bitfield-fix:
  Fix access to anonymous bitfield element through a constant value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants