# Sema: improve union support · gitcafe/zig

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

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

Visibility: public

Requested revision: 81a3910e443c71674a5eb96487431721bb8f1cad

Requested commit: 81a3910e443c71674a5eb96487431721bb8f1cad

Commit: 81a3910e443c71674a5eb96487431721bb8f1cad

Tree: 51ba8b555c7ba60c4efb52b67d6ec8b06bd57f43

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: improve union support

 * reduce number of branches in zirCmpEq
 * implement equality comparison for enums and unions
 * fix coercion from union to its tag type resulting in the wrong type
 * fix method calls of unions
 * implement peer type resolution for unions, enums, and enum literals
 * fix union tag type memory in the wrong arena

```

## Parents

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

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