fix compile error tests with unstable error sets

The print order of error sets depends on the order that the compiler
adds names to its internal state. These names can be anything, and
do not necessarily need to be from the same error set or be errors
at all. When the last remaining reference to builtin.cpu.arch was
removed in start.zig in 9b42bc1ce5, this order changed. Likely there
is something that has the name 'C' that is referenced somewhere
recursively from builtin.cpu.arch.

This all causes these few tests to fail, and hence the expected
order is simply updated now. Perhaps there is a better way to
add this.
This commit is contained in:
Robin Voetter 2024-10-27 18:02:12 +01:00
parent 49a067ccfe
commit 6d8ee89721
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -10,4 +10,4 @@ comptime {
// backend=stage2
// target=native
//
// :5:21: error: 'error.B' not a member of error set 'error{C,A}'
// :5:21: error: 'error.B' not a member of error set 'error{A,C}'

View File

@ -12,5 +12,5 @@ fn foo(set1: Set1) void {
// backend=stage2
// target=native
//
// :7:21: error: expected type 'error{C,A}', found 'error{A,B}'
// :7:21: error: expected type 'error{A,C}', found 'error{A,B}'
// :7:21: note: 'error.B' not a member of destination error set

View File

@ -16,4 +16,4 @@ comptime {
// backend=llvm
// target=native
//
// :11:21: error: 'error.B' not a member of error set 'error{C,A}'
// :11:21: error: 'error.B' not a member of error set 'error{A,C}'