# fix result loc implicit casting optionals and error unions · gitcafe/zig

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

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

Visibility: public

Requested revision: b552e68c143ead1b6bab662afd5b9fa8a7480f10

Requested commit: b552e68c143ead1b6bab662afd5b9fa8a7480f10

Commit: b552e68c143ead1b6bab662afd5b9fa8a7480f10

Tree: e2be585174abec39147418d7b600e631afb523ed

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
fix result loc implicit casting optionals and error unions

```zig
pub fn openHandle(handle: i32) File {
    return File{ .handle = handle };
}

pub fn getStdErr() anyerror!File {
    return openHandle(1);
}
```

````

## Parents

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

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