authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-08-05 11:09:39+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-08-10 10:00:37+01:00
log2209813baee8715e739d07b16a2910408ff9230a
treefa1cdf71a3dadad085b640d59e73c59ae40e1df9
parent7a7d0225d9825f0150e797a4ff06f6e56af08458
signaturelock-open Commit is signed but in an unrecognized format.

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.

7 files changed, 10 insertions(+), 6 deletions(-)

test/cases/compile_errors/anytype_param_requires_comptime.zig+1-1
...@@ -16,7 +16,7 @@ pub export fn entry() void {...@@ -16,7 +16,7 @@ pub export fn entry() void {
16// backend=stage216// backend=stage2
17// target=native17// target=native
18//18//
19// :7:14: error: runtime-known argument passed to comptime-only type parameter19// :7:14: error: runtime-known argument passed to parameter of comptime-only type
20// :9:12: note: declared here20// :9:12: note: declared here
21// :4:16: note: struct requires comptime because of this field21// :4:16: note: struct requires comptime because of this field
22// :4:16: note: types are not available at runtime22// :4:16: note: types are not available at runtime
test/cases/compile_errors/error_in_typeof_param.zig+1-1
...@@ -11,4 +11,4 @@ pub export fn entry() void {...@@ -11,4 +11,4 @@ pub export fn entry() void {
11// target=native11// target=native
12//12//
13// :6:31: error: unable to resolve comptime value13// :6:31: error: unable to resolve comptime value
14// :6:31: note: argument to parameter with comptime-only type must be comptime-known14// :6:31: note: value being casted to 'comptime_int' must be comptime-known
test/cases/compile_errors/generic_method_call_with_invalid_param.zig+2
...@@ -25,6 +25,8 @@ const S = struct {...@@ -25,6 +25,8 @@ const S = struct {
25// target=native25// target=native
26//26//
27// :3:18: error: expected type 'bool', found 'void'27// :3:18: error: expected type 'bool', found 'void'
28// :18:43: note: parameter type declared here
28// :8:18: error: expected type 'void', found 'bool'29// :8:18: error: expected type 'void', found 'bool'
30// :19:43: note: parameter type declared here
29// :14:26: error: runtime-known argument passed to comptime parameter31// :14:26: error: runtime-known argument passed to comptime parameter
30// :20:57: note: declared comptime here32// :20:57: note: declared comptime here
test/cases/compile_errors/invalid_store_to_comptime_field.zig+3-2
...@@ -76,8 +76,9 @@ pub export fn entry8() void {...@@ -76,8 +76,9 @@ pub export fn entry8() void {
76// :19:38: error: value stored in comptime field does not match the default value of the field76// :19:38: error: value stored in comptime field does not match the default value of the field
77// :31:19: error: value stored in comptime field does not match the default value of the field77// :31:19: error: value stored in comptime field does not match the default value of the field
78// :25:29: note: default value set here78// :25:29: note: default value set here
79// :41:16: error: value stored in comptime field does not match the default value of the field79// :41:19: error: value stored in comptime field does not match the default value of the field
80// :35:29: note: default value set here
80// :45:12: error: value stored in comptime field does not match the default value of the field81// :45:12: error: value stored in comptime field does not match the default value of the field
81// :53:16: error: value stored in comptime field does not match the default value of the field82// :53:25: error: value stored in comptime field does not match the default value of the field
82// :66:43: error: value stored in comptime field does not match the default value of the field83// :66:43: error: value stored in comptime field does not match the default value of the field
83// :59:35: error: value stored in comptime field does not match the default value of the field84// :59:35: error: value stored in comptime field does not match the default value of the field
test/cases/compile_errors/wrong_types_given_to_export.zig+1-1
...@@ -7,5 +7,5 @@ comptime {...@@ -7,5 +7,5 @@ comptime {
7// backend=stage27// backend=stage2
8// target=native8// target=native
9//9//
10// :3:51: error: expected type 'builtin.GlobalLinkage', found 'u32'10// :3:21: error: expected type 'builtin.GlobalLinkage', found 'u32'
11// :?:?: note: enum declared here11// :?:?: note: enum declared here
test/cases/compile_errors/zero-bit_generic_args_are_coerced_to_param_type.zig+1
...@@ -8,3 +8,4 @@ pub export fn entry() void {...@@ -8,3 +8,4 @@ pub export fn entry() void {
8// target=native8// target=native
9//9//
10// :3:21: error: expected type 'u0', found '*const [4:0]u8'10// :3:21: error: expected type 'u0', found '*const [4:0]u8'
11// :1:23: note: parameter type declared here
test/compile_errors.zig+1-1
...@@ -207,7 +207,7 @@ pub fn addCases(ctx: *Cases) !void {...@@ -207,7 +207,7 @@ pub fn addCases(ctx: *Cases) !void {
207 ":1:38: note: declared comptime here",207 ":1:38: note: declared comptime here",
208 ":8:36: error: runtime-known argument passed to comptime parameter",208 ":8:36: error: runtime-known argument passed to comptime parameter",
209 ":2:41: note: declared comptime here",209 ":2:41: note: declared comptime here",
210 ":13:29: error: runtime-known argument passed to comptime-only type parameter",210 ":13:29: error: runtime-known argument passed to parameter of comptime-only type",
211 ":3:24: note: declared here",211 ":3:24: note: declared here",
212 ":12:35: note: struct requires comptime because of this field",212 ":12:35: note: struct requires comptime because of this field",
213 ":12:35: note: types are not available at runtime",213 ":12:35: note: types are not available at runtime",