aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_missized_packed_struct.zig
blob: 791f97cc311b6f33b5859e1612c684cde6d0d6c3 (plain)
1
2
3
4
5
6
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