# stage 1: improve error message if error union is cast to payload \(\#10770\) · gitcafe/zig

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

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

Visibility: public

Requested revision: f5471299d81e809c706e147d2ea79c83aeb8b650

Requested commit: f5471299d81e809c706e147d2ea79c83aeb8b650

Commit: f5471299d81e809c706e147d2ea79c83aeb8b650

Tree: 1683dd8fbabedf2ffc1e6abb6c7d838f619f41d1

Author: Sebsatian Keller

Committer: GitHub

## Message

```
stage 1: improve error message if error union is cast to payload (#10770)

Also: Added special error message for for `?T` to `T` casting
```

## Parents

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

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