# stage2: improve orelse implementation · gitcafe/zig

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

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

Visibility: public

Requested revision: 713f1138222dc40355c34c70d83b0a0805bd46c6

Requested commit: 713f1138222dc40355c34c70d83b0a0805bd46c6

Commit: 713f1138222dc40355c34c70d83b0a0805bd46c6

Tree: a6060a67d81b1f875e0cfb947fadec9325b37a89

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: improve orelse implementation

 * Now it supports being an lvalue (see additional lines in the test
   case).
 * Properly handles a pointer result location (see additional lines in
   the test case that assign the result of the orelse to a variable
   rather than a const).
 * Properly sets the result location type when possible, so that type
   inference of an `orelse` operand expression knows its result type.

```

## Parents

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

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