mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 10:33:19 +00:00
AstGen: fix ZIR struct encoding
off by one error in the bits that describe defaults/field alignments as soon as we have tests for struct field alignment and default values, there will be coverage for this.
This commit is contained in:
parent
015599d1ef
commit
ccdba774c8
@ -1857,7 +1857,7 @@ fn containerDecl(
|
||||
|
||||
field_index += 1;
|
||||
}
|
||||
const empty_slot_count = 16 - ((field_index - 1) % 16);
|
||||
const empty_slot_count = 16 - (field_index % 16);
|
||||
cur_bit_bag >>= @intCast(u5, empty_slot_count * 2);
|
||||
|
||||
const result = try gz.addPlNode(tag, node, zir.Inst.StructDecl{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user