# Sema: preserve extern struct field alignment · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/4620972d086ebb3b7686a79914876488c6dfd171)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 4620972d086ebb3b7686a79914876488c6dfd171

Requested commit: 4620972d086ebb3b7686a79914876488c6dfd171

Commit: 4620972d086ebb3b7686a79914876488c6dfd171

Tree: 8f2f47f0a02deb0f535f77b38a801d0259ac1745

Author: Alex Kladov

Committer: Jakub Konka

## Message

```
Sema: preserve extern struct field alignment

In

    extern struct { x: u32, y: u16 }

we actually know that y's alignment is `@alignOf(u32)`, and not just
`@alignOf(u16)`.

closes: #16134

```

## Parents

- [28f515acd7bb6e008fcb2e9f760053f0c9e97992](https://git.cafe/gitcafe/zig/commit/28f515acd7bb6e008fcb2e9f760053f0c9e97992?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/4620972d086ebb3b7686a79914876488c6dfd171?format=markdown)
