# Sema: detect comptime-known union initializations · gitcafe/zig

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

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

Visibility: public

Requested revision: 1c8a86f063b65e95c2e23ceaa40843069adfdc23

Requested commit: 1c8a86f063b65e95c2e23ceaa40843069adfdc23

Commit: 1c8a86f063b65e95c2e23ceaa40843069adfdc23

Tree: 2ff8a2b231a4e3cc5f21f5681f7b092c0ddc3bb9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: detect comptime-known union initializations

Follow a similar pattern as we already do for validate_array_init and
validate_struct_init.

I threw in a bit of behavior test cleanup on top of it.

```

## Parents

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

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