# Allow idx 0 err to be put into error_name_table · gitcafe/zig

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

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

Visibility: public

Requested revision: 54706dd2294d998c6c6ad91c80a23a3471677c43

Requested commit: 54706dd2294d998c6c6ad91c80a23a3471677c43

Commit: 54706dd2294d998c6c6ad91c80a23a3471677c43

Tree: 66d856c4c9715377385ac5c0abbe477eafae7991

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
Allow idx 0 err to be put into error_name_table

This way, in the very situation where a function has a return type
an error union such as `anyerror!void` but doesn't have any erroneous
paths, calling `@errorName` on the unpacked error (which will never
be triggered) will not trip up the static analyzer.

```

## Parents

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

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