# stage2: Fix panic on initializing comptime fields in tuple · gitcafe/zig

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

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

Visibility: public

Requested revision: 480e7eec65c02952b71ecc2f4ff2adccb6092a5f

Requested commit: 480e7eec65c02952b71ecc2f4ff2adccb6092a5f

Commit: 480e7eec65c02952b71ecc2f4ff2adccb6092a5f

Tree: b3637be2086b25649d71e2d24d334aa634e87e03

Author: Cody Tapscott

Committer: Andrew Kelley

## Message

```
stage2: Fix panic on initializing comptime fields in tuple

This resolves https://github.com/ziglang/zig/issues/11159

The problem was that:
  1. We were not correctly deleting the field stores after recognizing
     that an array initializer was a comptime-known value.
  2. LLVM was not checking that the final type had no runtime bits, and
     so would generate an invalid store.

This also adds several test cases for related bugs, just to check these
in for later work.

```

## Parents

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

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