# Sema: implement else capture value · gitcafe/zig

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

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

Visibility: public

Requested revision: 84c2c47fae82e913286a2306d8947252ae3a42f7

Requested commit: 84c2c47fae82e913286a2306d8947252ae3a42f7

Commit: 84c2c47fae82e913286a2306d8947252ae3a42f7

Tree: a57dc1f9a211f3852496988ae1e09a222e9d6f29

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: implement else capture value

The ZIR instructions `switch_capture_else` and `switch_capture_ref` are
removed because they are not needed. Instead, the prong index is set to
max int for the special prong.

Else prong with error sets is not handled yet.

Adds a new behavior test because there was not a prior on to cover only
the capture value of else on a switch.

```

## Parents

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

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