diff --git a/test/cases/compile_errors/packed_union_fields_mismatch.zig b/test/cases/compile_errors/packed_union_fields_mismatch.zig new file mode 100644 index 0000000000..b2c1a5fbbc --- /dev/null +++ b/test/cases/compile_errors/packed_union_fields_mismatch.zig @@ -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