# AstGen: add missing coercion for const locals · gitcafe/zig

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

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

Visibility: public

Requested revision: 2c434cddd6624cfd5c71f081b9445936d25c7703

Requested commit: 2c434cddd6624cfd5c71f081b9445936d25c7703

Commit: 2c434cddd6624cfd5c71f081b9445936d25c7703

Tree: b7512d9b316275efeff0c93fb034b47ae045d6d5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
AstGen: add missing coercion for const locals

A const local which had its init expression write to the result pointer,
but then gets elided to directly initialize, was missing the coercion to
the type annotation.

```

## Parents

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

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