Sema: require reified packed struct fields to have zero alignment
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export fn entry() void {
|
||||
_ = @Type(.{ .Struct = .{ .layout = .Packed, .fields = &.{
|
||||
.{ .name = "one", .field_type = u4, .default_value = null, .is_comptime = false, .alignment = 2 },
|
||||
}, .decls = &.{}, .is_tuple = false } });
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:9: error: alignment in a packed struct field must be set to 0
|
||||
Reference in New Issue
Block a user