# Sema: correct source location for return value coercion errors · gitcafe/zig

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

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

Visibility: public

Requested revision: e6cf3ce24c42d4a2dffd4f0204a22a31eef3c562

Requested commit: e6cf3ce24c42d4a2dffd4f0204a22a31eef3c562

Commit: e6cf3ce24c42d4a2dffd4f0204a22a31eef3c562

Tree: eaa21f0a22f03d595151edc806d7120d8f5e0074

Author: mlugg

Committer: mlugg

## Message

```
Sema: correct source location for return value coercion errors

When coercing the operand of a `ret_node` etc instruction, the source
location for errors used to point to the entire `return` statement.
Instead, we now point to the operand, as would be expected if there was
an explicit `as_node` instruction (like there used to be).

```

## Parents

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

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