# Fix generation of container initializers · gitcafe/zig

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

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

Visibility: public

Requested revision: 9902b604cb01072d4599035b59724731cf03fdbc

Requested commit: 9902b604cb01072d4599035b59724731cf03fdbc

Commit: 9902b604cb01072d4599035b59724731cf03fdbc

Tree: 67d5deb790c0abca47b60b95c729dc0e10b93a38

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
Fix generation of container initializers

The code creates temporary ConstExprValue with global_refs set to
nullptr and that's carried over to the final value. Doing so prevents
the deduplication mechanism to work correctly, causing all sorts of
runtime crashes.

Fixes #1636
Fixes #1608 (Even though it was already fixed by #1991)

```

## Parents

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

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