diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-08-05 11:09:39 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2023-08-10 10:00:37 +0100 |
| commit | 2209813baee8715e739d07b16a2910408ff9230a (patch) | |
| tree | fa1cdf71a3dadad085b640d59e73c59ae40e1df9 /test/cases/compile_errors | |
| parent | 7a7d0225d9825f0150e797a4ff06f6e56af08458 (diff) | |
| download | zig-2209813baee8715e739d07b16a2910408ff9230a.tar.gz zig-2209813baee8715e739d07b16a2910408ff9230a.zip | |
cases: modify error wording to match new errors
The changes to result locations and generic calls has caused mild
changes to some compile errors. Some are slightly better, some slightly
worse, but none of the changes are major.
Diffstat (limited to 'test/cases/compile_errors')
6 files changed, 9 insertions, 5 deletions
diff --git a/test/cases/compile_errors/anytype_param_requires_comptime.zig b/test/cases/compile_errors/anytype_param_requires_comptime.zig index 453bd5bce5..6fd86b0de3 100644 --- a/test/cases/compile_errors/anytype_param_requires_comptime.zig +++ b/test/cases/compile_errors/anytype_param_requires_comptime.zig @@ -16,7 +16,7 @@ pub export fn entry() void { // backend=stage2 // target=native // -// :7:14: error: runtime-known argument passed to comptime-only type parameter +// :7:14: error: runtime-known argument passed to parameter of comptime-only type // :9:12: note: declared here // :4:16: note: struct requires comptime because of this field // :4:16: note: types are not available at runtime diff --git a/test/cases/compile_errors/error_in_typeof_param.zig b/test/cases/compile_errors/error_in_typeof_param.zig index 02d33e04f9..073bd29bc3 100644 --- a/test/cases/compile_errors/error_in_typeof_param.zig +++ b/test/cases/compile_errors/error_in_typeof_param.zig @@ -11,4 +11,4 @@ pub export fn entry() void { // target=native // // :6:31: error: unable to resolve comptime value -// :6:31: note: argument to parameter with comptime-only type must be comptime-known +// :6:31: note: value being casted to 'comptime_int' must be comptime-known diff --git a/test/cases/compile_errors/generic_method_call_with_invalid_param.zig b/test/cases/compile_errors/generic_method_call_with_invalid_param.zig index 0cea61301c..ccea6708e4 100644 --- a/test/cases/compile_errors/generic_method_call_with_invalid_param.zig +++ b/test/cases/compile_errors/generic_method_call_with_invalid_param.zig @@ -25,6 +25,8 @@ const S = struct { // target=native // // :3:18: error: expected type 'bool', found 'void' +// :18:43: note: parameter type declared here // :8:18: error: expected type 'void', found 'bool' +// :19:43: note: parameter type declared here // :14:26: error: runtime-known argument passed to comptime parameter // :20:57: note: declared comptime here diff --git a/test/cases/compile_errors/invalid_store_to_comptime_field.zig b/test/cases/compile_errors/invalid_store_to_comptime_field.zig index fd6fff5e17..b2605f9158 100644 --- a/test/cases/compile_errors/invalid_store_to_comptime_field.zig +++ b/test/cases/compile_errors/invalid_store_to_comptime_field.zig @@ -76,8 +76,9 @@ pub export fn entry8() void { // :19:38: error: value stored in comptime field does not match the default value of the field // :31:19: error: value stored in comptime field does not match the default value of the field // :25:29: note: default value set here -// :41:16: error: value stored in comptime field does not match the default value of the field +// :41:19: error: value stored in comptime field does not match the default value of the field +// :35:29: note: default value set here // :45:12: error: value stored in comptime field does not match the default value of the field -// :53:16: error: value stored in comptime field does not match the default value of the field +// :53:25: error: value stored in comptime field does not match the default value of the field // :66:43: error: value stored in comptime field does not match the default value of the field // :59:35: error: value stored in comptime field does not match the default value of the field diff --git a/test/cases/compile_errors/wrong_types_given_to_export.zig b/test/cases/compile_errors/wrong_types_given_to_export.zig index 6e688d33d6..8278deac15 100644 --- a/test/cases/compile_errors/wrong_types_given_to_export.zig +++ b/test/cases/compile_errors/wrong_types_given_to_export.zig @@ -7,5 +7,5 @@ comptime { // backend=stage2 // target=native // -// :3:51: error: expected type 'builtin.GlobalLinkage', found 'u32' +// :3:21: error: expected type 'builtin.GlobalLinkage', found 'u32' // :?:?: note: enum declared here diff --git a/test/cases/compile_errors/zero-bit_generic_args_are_coerced_to_param_type.zig b/test/cases/compile_errors/zero-bit_generic_args_are_coerced_to_param_type.zig index 0288979084..bf819220a3 100644 --- a/test/cases/compile_errors/zero-bit_generic_args_are_coerced_to_param_type.zig +++ b/test/cases/compile_errors/zero-bit_generic_args_are_coerced_to_param_type.zig @@ -8,3 +8,4 @@ pub export fn entry() void { // target=native // // :3:21: error: expected type 'u0', found '*const [4:0]u8' +// :1:23: note: parameter type declared here |
