mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
Compilation: fix reference trace behavior without -freference-trace
When `-freference-trace` is not passed, we want to show exactly one reference trace. Previously, we set the reference trace root in `Sema` iff there were no other failed analyses. However, this results in an arbitrary error being the one with the reference trace after error sorting. It is also incompatible with incremental compilation, where some errors might be unreferenced. Instead, set the field on all analysis errors, and decide in `Compilation.getAllErrorsAlloc` which reference trace[s] to actually show.
This commit is contained in:
parent
cc1475c91d
commit
70040778fb
2 changed files with 22 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue