# Fix error reporting the wrong line for struct field inits \(\#13502\) · gitcafe/zig

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

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

Visibility: public

Requested revision: c4f7663c921033a52b1688b88811c92422d58293

Requested commit: c4f7663c921033a52b1688b88811c92422d58293

Commit: c4f7663c921033a52b1688b88811c92422d58293

Tree: db397e08151a9666b3a1d03d6b97bcea9eada6e1

Author: mparadinha

Committer: GitHub

## Message

```
Fix error reporting the wrong line for struct field inits (#13502)

* point to init part of field delc when that's where the error occurs

* update test to reflect fixed error message

* only lookup source location in case of error
```

## Parents

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

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