mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
6 lines
223 B
Zig
6 lines
223 B
Zig
test "missized packed struct" {
|
|
const S = packed struct(u32) { a: u16, b: u8 };
|
|
_ = S{ .a = 4, .b = 2 };
|
|
}
|
|
|
|
// test_error=backing integer type 'u32' has bit size 32 but the struct fields have a total bit size of 24
|