# AstGen: update @errorCast to maybe eval to err · gitcafe/zig

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

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

Visibility: public

Requested revision: 7a4d69983a6ac7ab91f71910cec5886ed5bec745

Requested commit: 7a4d69983a6ac7ab91f71910cec5886ed5bec745

Commit: 7a4d69983a6ac7ab91f71910cec5886ed5bec745

Tree: 085a161cf0a257ff15b9b86e89865f300286247d

Author: Michael Dusan

Committer: Matthew Lugg

## Message

```
AstGen: update @errorCast to maybe eval to err

Consequently, `AstGen.ret()` now passes the error code to
`.defer_error_code`. Previously, the error union value was passed.

closes #20371

```

## Parents

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

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