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 {
1616// backend=stage2
1717// target=native
1818//
19// :7:14: error: runtime-known argument passed to comptime-only type parameter
19// :7:14: error: runtime-known argument passed to parameter of comptime-only type
2020// :9:12: note: declared here
2121// :4:16: note: struct requires comptime because of this field
2222// :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 {
1111// target=native
1212//
1313// :6:31: error: unable to resolve comptime value
14// :6:31: note: argument to parameter with comptime-only type must be comptime-known
14// :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 {
2525// target=native
2626//
2727// :3:18: error: expected type 'bool', found 'void'
28// :18:43: note: parameter type declared here
2829// :8:18: error: expected type 'void', found 'bool'
30// :19:43: note: parameter type declared here
2931// :14:26: error: runtime-known argument passed to comptime parameter
3032// :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 {
7676// :19:38: error: value stored in comptime field does not match the default value of the field
7777// :31:19: error: value stored in comptime field does not match the default value of the field
7878// :25:29: note: default value set here
79// :41:16: error: value stored in comptime field does not match the default value of the field
79// :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
8081// :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 field
82// :53:25: error: value stored in comptime field does not match the default value of the field
8283// :66:43: error: value stored in comptime field does not match the default value of the field
8384// :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 {
77// backend=stage2
88// target=native
99//
10// :3:51: error: expected type 'builtin.GlobalLinkage', found 'u32'
10// :3:21: error: expected type 'builtin.GlobalLinkage', found 'u32'
1111// :?:?: 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 {
88// target=native
99//
1010// :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 {
207207 ":1:38: note: declared comptime here",
208208 ":8:36: error: runtime-known argument passed to comptime parameter",
209209 ":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",
211211 ":3:24: note: declared here",
212212 ":12:35: note: struct requires comptime because of this field",
213213 ":12:35: note: types are not available at runtime",