# stage2: resolve array type for typed array init expressions · gitcafe/zig

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

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

Visibility: public

Requested revision: c9fac41368c872d424681ea3cf93a9d97157143e

Requested commit: c9fac41368c872d424681ea3cf93a9d97157143e

Commit: c9fac41368c872d424681ea3cf93a9d97157143e

Tree: 887f6058136580aad6110a329d82038ba71ad663

Author: Mitchell Hashimoto

Committer: Mitchell Hashimoto

## Message

```
stage2: resolve array type for typed array init expressions

Array types with sentinels were not being typed correctly in the
translation from ZIR to Sema (comptime). This modifies the `array_init`
ZIR to also retain the type of the init expression (note: untyped array
initialization is done via the `array_init_anon` ZIR and so is unchanged
in this commit).

```

## Parents

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

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