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

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

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

Visibility: public

Requested revision: 5872ae5111ae49f3e82e2d07f7c199d6550a1bd7

Requested commit: 5872ae5111ae49f3e82e2d07f7c199d6550a1bd7

Commit: 5872ae5111ae49f3e82e2d07f7c199d6550a1bd7

Tree: dc268b3ccfa9ce216fd0f43ff672ed9d419817a1

Author: LemonBoy

Committer: Veikka Tuominen

## 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

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

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