# stage1: Fix comparison of unions containing zero-sized types · gitcafe/zig

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

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

Visibility: public

Requested revision: 4d4ab1e69a40fb11d19e93b42a02016f9d009aef

Requested commit: 4d4ab1e69a40fb11d19e93b42a02016f9d009aef

Commit: 4d4ab1e69a40fb11d19e93b42a02016f9d009aef

Tree: ca4312aad89b1a198eab033f972ee2882d8ce04b

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
stage1: Fix comparison of unions containing zero-sized types

The code tried to be too smart and skipped the equality (returning true)
if the payload type was zero-sized.
This optimization is completely wrong when the union payload is a
metatype!

Fixes #7047

```

## Parents

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

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