aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/packed_union_fields_mismatch.zig
blob: 7f5ac456bfe246c5a69c9b00545d64749d27871f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export fn entry1() void {
    _ = packed union {
        a: u1,
        b: u2,
    };
}

// error
//
// :2:16: error: packed union has fields with mismatching bit sizes
// :3:12: note: 1 bits here
// :4:12: note: 2 bits here