Commit 825da34769
Changed files (1)
test
cases
compile_errors
test/cases/compile_errors/union_depends_on_pointer_alignment.zig
@@ -0,0 +1,11 @@
+const U = union {
+ next: ?*align(1) U align(128),
+};
+
+export fn entry() usize {
+ return @alignOf(U);
+}
+
+// error
+//
+// :1:11: error: union layout depends on being pointer aligned