Skip to content

Commit

Permalink
test: fix anonymous type names in compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiller committed Feb 25, 2025
1 parent b6f47de commit d4e1332
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions test/cases/compile_errors/@import_zon_bad_type.zig
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ export fn testMutablePointer() void {
// tmp.zig:37:38: note: imported here
// neg_inf.zon:1:1: error: expected type '?u8'
// tmp.zig:57:28: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_487'
// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_491'
// tmp.zig:62:39: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_489'
// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_493'
// tmp.zig:67:44: note: imported here
// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_492'
// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_496'
// tmp.zig:72:50: note: imported here
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ pub export fn entry() void {
// error
//
// :7:25: error: unable to resolve comptime value
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_461.C' must be comptime-known
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_465.C' must be comptime-known
// :4:16: note: struct requires comptime because of this field
// :4:16: note: types are not available at runtime
2 changes: 1 addition & 1 deletion test/cases/compile_errors/bogus_method_call_on_slice.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ pub export fn entry2() void {
//
// :3:6: error: no field or member function named 'copy' in '[]const u8'
// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_465'
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_469'
// :12:6: note: struct declared here
2 changes: 1 addition & 1 deletion test/cases/compile_errors/coerce_anon_struct.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export fn foo() void {

// error
//
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_454'
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_458'
// :3:16: note: struct declared here
// :1:11: note: struct declared here
4 changes: 2 additions & 2 deletions test/cases/compile_errors/redundant_try.zig
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ comptime {
//
// :5:23: error: expected error union type, found 'comptime_int'
// :10:23: error: expected error union type, found '@TypeOf(.{})'
// :15:23: error: expected error union type, found 'tmp.test2__struct_491'
// :15:23: error: expected error union type, found 'tmp.test2__struct_495'
// :15:23: note: struct declared here
// :20:27: error: expected error union type, found 'tmp.test3__struct_493'
// :20:27: error: expected error union type, found 'tmp.test3__struct_497'
// :20:27: note: struct declared here
// :25:23: error: expected error union type, found 'struct { comptime *const [5:0]u8 = "hello" }'
// :31:13: error: expected error union type, found 'u32'

0 comments on commit d4e1332

Please sign in to comment.