| author | |
| committer | |
| log | 825da34769784c7bdfa0d6be325c7299d992a951 |
| tree | 09753969d06709850cc8a67bcd31344bb627e4d2 |
| parent | fb523c6283be546369250b9172aad040d44f42dd |
1 files changed, 11 insertions(+), 0 deletions(-)
test/cases/compile_errors/union_depends_on_pointer_alignment.zig created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | const U = union { | |
| 2 | next: ?*align(1) U align(128), | |
| 3 | }; | |
| 4 | ||
| 5 | export fn entry() usize { | |
| 6 | return @alignOf(U); | |
| 7 | } | |
| 8 | ||
| 9 | // error | |
| 10 | // | |
| 11 | // :1:11: error: union layout depends on being pointer aligned |