mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
add compile error test case for new error
This commit is contained in:
parent
8c631ebfee
commit
5dc5bf6a6b
1 changed files with 14 additions and 0 deletions
14
test/cases/compile_errors/packed_union_fields_mismatch.zig
Normal file
14
test/cases/compile_errors/packed_union_fields_mismatch.zig
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export fn entry1() void {
|
||||
_ = packed union {
|
||||
a: u1,
|
||||
b: u2,
|
||||
};
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:16: error: packed union has fields with mismatching bit sizes
|
||||
// :3:12: note: 1 bits here
|
||||
// :4:12: note: 2 bits here
|
||||
Loading…
Add table
Reference in a new issue