# inferred comptime values rather than elided scopes · gitcafe/zig

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

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

Visibility: public

Requested revision: b025193de5b951734e5108e4762e5dc40359431b

Requested commit: b025193de5b951734e5108e4762e5dc40359431b

Commit: b025193de5b951734e5108e4762e5dc40359431b

Tree: 4b29d27c03bbf6604964276ad01d35aab010540e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
inferred comptime values rather than elided scopes

because of this example:

```zig
export fn entry(b: bool) usize {
    var runtime = [1]i32{3};
    comptime var i: usize = 0;
    inline while (i < 2) : (i += 1) {
        const result = if (i == 0) [1]i32{2} else runtime;
    }
    comptime {
        return i;
    }
}
```

The problem is that the concept of "resetting" a result location,
introduced in the previous commit, cannot handle elision scopes.
This concept is inherently broken with inline loops.

````

## Parents

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

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