mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
add compile error test case for new error
This commit is contained in:
parent
8c631ebfee
commit
5dc5bf6a6b
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…
x
Reference in New Issue
Block a user