From 6a8cf25a8aea11ef80b48c9bce59d0aafcff3297 Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 18 Jun 2024 04:55:39 +0100 Subject: [PATCH] cases: un-regress some notes Since we now have source locations for reified types again, some error notes have returned which were previously regressed by this branch. --- .../compile_errors/comptime_arg_to_generic_fn_callee_error.zig | 1 + .../reify_type_for_tagged_union_with_extra_enum_field.zig | 2 ++ .../reify_type_for_tagged_union_with_extra_union_field.zig | 1 + .../reify_type_for_tagged_union_with_no_enum_fields.zig | 1 + .../reify_type_for_tagged_union_with_no_union_fields.zig | 3 +++ 5 files changed, 8 insertions(+) diff --git a/test/cases/compile_errors/comptime_arg_to_generic_fn_callee_error.zig b/test/cases/compile_errors/comptime_arg_to_generic_fn_callee_error.zig index 8d8516eecc..efc3f556a9 100644 --- a/test/cases/compile_errors/comptime_arg_to_generic_fn_callee_error.zig +++ b/test/cases/compile_errors/comptime_arg_to_generic_fn_callee_error.zig @@ -18,3 +18,4 @@ pub export fn entry() void { // target=native // // :7:28: error: no field named 'c' in enum 'meta.FieldEnum(tmp.MyStruct)' +// :?:?: note: enum declared here diff --git a/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_enum_field.zig b/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_enum_field.zig index 25b58e7c29..0ea0b019b9 100644 --- a/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_enum_field.zig +++ b/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_enum_field.zig @@ -31,3 +31,5 @@ export fn entry() void { // target=native // // :13:16: error: enum fields missing in union +// :1:13: note: field 'arst' missing, declared here +// :1:13: note: enum declared here diff --git a/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_union_field.zig b/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_union_field.zig index dd324f751c..ed6f2245d4 100644 --- a/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_union_field.zig +++ b/test/cases/compile_errors/reify_type_for_tagged_union_with_extra_union_field.zig @@ -31,3 +31,4 @@ export fn entry() void { // target=native // // :12:16: error: no field named 'arst' in enum 'tmp.Tag' +// :1:13: note: enum declared here diff --git a/test/cases/compile_errors/reify_type_for_tagged_union_with_no_enum_fields.zig b/test/cases/compile_errors/reify_type_for_tagged_union_with_no_enum_fields.zig index 188b4d9d6a..91c5354c0c 100644 --- a/test/cases/compile_errors/reify_type_for_tagged_union_with_no_enum_fields.zig +++ b/test/cases/compile_errors/reify_type_for_tagged_union_with_no_enum_fields.zig @@ -27,3 +27,4 @@ export fn entry() void { // target=native // // :9:16: error: no field named 'signed' in enum 'tmp.Tag' +// :1:13: note: enum declared here diff --git a/test/cases/compile_errors/reify_type_for_tagged_union_with_no_union_fields.zig b/test/cases/compile_errors/reify_type_for_tagged_union_with_no_union_fields.zig index 5c367e9ba6..2dc9832470 100644 --- a/test/cases/compile_errors/reify_type_for_tagged_union_with_no_union_fields.zig +++ b/test/cases/compile_errors/reify_type_for_tagged_union_with_no_union_fields.zig @@ -27,3 +27,6 @@ export fn entry() void { // target=native // // :12:16: error: enum fields missing in union +// :1:13: note: field 'signed' missing, declared here +// :1:13: note: field 'unsigned' missing, declared here +// :1:13: note: enum declared here