# Sema: adjust coercion of undefined error union payload · gitcafe/zig

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

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

Visibility: public

Requested revision: b59428e9f78b1f9f265c0ffdba79b128d77644d2

Requested commit: b59428e9f78b1f9f265c0ffdba79b128d77644d2

Commit: b59428e9f78b1f9f265c0ffdba79b128d77644d2

Tree: c6a9a066eee45fc5ca3009e3b8bcf1f219adbd83

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: adjust coercion of undefined error union payload

To no longer set the error code to undefined. This fixes the problem
where an undefined single-item pointer coerced to an error union of a
slice set the whole thing to undefined even though the sub-coercion to
the slice would have produced a defined value.

```

## Parents

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

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