Commit 5dc5bf6a6b
Changed files (1)
test
cases
compile_errors
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