# stage1: Fix crash in comptime struct generation · gitcafe/zig

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

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

Visibility: public

Requested revision: aa6fc29744de4008e97faf0f54ccb52ebbdf5ca2

Requested commit: aa6fc29744de4008e97faf0f54ccb52ebbdf5ca2

Commit: aa6fc29744de4008e97faf0f54ccb52ebbdf5ca2

Tree: 1ac1a1a0c2630c57f0cb54115e29ba96fff22677

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
stage1: Fix crash in comptime struct generation

Using the gen_index rather than the src_index is needed to handle
structures containing zero-sized or comptime only types.

Closes #7027

```

## Parents

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

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