# codegen: Order error union fields per alignment · gitcafe/zig

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

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

Visibility: public

Requested revision: c90a97f9be9ffef858b0e450de5006f61a12fafd

Requested commit: c90a97f9be9ffef858b0e450de5006f61a12fafd

Commit: c90a97f9be9ffef858b0e450de5006f61a12fafd

Tree: c8ba955be7b7cd81230a2e0da39f2c36e73a681e

Author: Luuk de Gram

Committer: Andrew Kelley

## Message

```
codegen: Order error union fields per alignment

Based on the size of the payload the native backends will lower
the error union with its fields (errorset & payload) in the correct order.
e.g. ErrorA!u8 will first lower the error set's value and then the payload.
In the event of ErrorA!u32 will lower the payload first.

```

## Parents

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

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