# Sema: improve non-exhaustive enum support · gitcafe/zig

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

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

Visibility: public

Requested revision: 629a54c711c0a71381ea1e5b1a62e5fcc986e048

Requested commit: 629a54c711c0a71381ea1e5b1a62e5fcc986e048

Commit: 629a54c711c0a71381ea1e5b1a62e5fcc986e048

Tree: ca1753a023ae8593f048e880b376a108b0436125

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: improve non-exhaustive enum support

 * remove false positive "all prongs handled" compile error for
   non-exhaustive enums.
 * implement `@TypeInfo` for enums, except enums which have any
   declarations is still TODO.
 * `getBuiltin` uses nomespaceLookup/analyzeDeclVal rather than
   namespaceLookupRef/analyzeLoad. Avoids a detour through an
   unnecessary type, and adds a detour through a caching mechanism.
 * `Value.eql`: add missing code to handle enum comparisons for
   non-exhaustive enums. It works by converting the enum tags to numeric
   values and comparing those.

```

## Parents

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

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