# fix declref not writing to result loc · gitcafe/zig

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

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

Visibility: public

Requested revision: 0d62c929470458e30b888f76d029fff48d31fd3b

Requested commit: 0d62c929470458e30b888f76d029fff48d31fd3b

Commit: 0d62c929470458e30b888f76d029fff48d31fd3b

Tree: 0b8b0e54681df1cd8068504ce61eac260f010c08

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
fix declref not writing to result loc

```zig
const a: i32 = 0;
const b: i32 = 1;
const c: i32 = 2;
const d: i32 = 3;

export fn entry(x: bool) i32 {
    return if (x)
        if (x)
            a
        else if (x)
            b
        else
            c
    else
        d;
}
```

````

## Parents

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

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