mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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:
parent
49a067ccfe
commit
6d8ee89721
@ -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}'
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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}'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user