# Sema: fix nested error union coercions · gitcafe/zig

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

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

Visibility: public

Requested revision: 5611779f391c9ae48c0abf7662b1e9020be6ea14

Requested commit: 5611779f391c9ae48c0abf7662b1e9020be6ea14

Commit: 5611779f391c9ae48c0abf7662b1e9020be6ea14

Tree: 0f9ea2887ce855db832743c9c73f0033161b9118

Author: Matthew Lugg

Committer: Matthew Lugg

## Message

```
Sema: fix nested error union coercions

Previously, `E1!void` failed to coerce to `E2!E1!void` because it tried
to coerce the `E1` error to an `E2` if comptime-known and refused to
attempt any other coercion. This is a strange language rule with no
clear justification, and breaks real use cases (such as calling `getOne`
on an `Io.Queue(E!T)`). Instead, only error *sets* should try to coerce
to an "error" value of an error union type.

```

## Parents

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

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