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

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

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

Visibility: public

Requested revision: 85665386c68d176c839048b55f5249d923087890

Requested commit: 85665386c68d176c839048b55f5249d923087890

Commit: 85665386c68d176c839048b55f5249d923087890

Tree: ee1f14e340635f6ee6603f9c3a32a000f238288b

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

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

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