# ir: Prevent crash in compiler error · gitcafe/zig

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

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

Visibility: public

Requested revision: 06d0dac0fb58c2d20036e34f5c1a1bc9c386c189

Requested commit: 06d0dac0fb58c2d20036e34f5c1a1bc9c386c189

Commit: 06d0dac0fb58c2d20036e34f5c1a1bc9c386c189

Tree: be7a91b228dc4f385a9bce111857f905d7506af8

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
ir: Prevent crash in compiler error

Anonymous containers have no struct_field->type AstNode set, let's
always use the field node itself to make the error messages consistent.

Closes #4691

```

## Parents

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

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