# Sema: more union fixes · gitcafe/zig

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

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

Visibility: public

Requested revision: efb7148a4574c608b21359fcbf2edf06afdb5e0c

Requested commit: efb7148a4574c608b21359fcbf2edf06afdb5e0c

Commit: efb7148a4574c608b21359fcbf2edf06afdb5e0c

Tree: 23e47a49f95e60ea315603407bd5793310978c62

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: more union fixes

 * `Module.Union.getLayout`: fixes to support components of the union
   being 0 bits.
 * Implement `@typeInfo` for unions.
 * Add missing calls to `resolveTypeFields`.
 * Fix explicitly-provided union tag types passing a `Zir.Inst.Ref`
   where an `Air.Inst.Ref` was expected. We don't have any type safety
   for this; these typess are aliases.
 * Fix explicitly-provided `union(enum)` tag Values allocated to the
   wrong arena.

```

## Parents

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

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