| ... | ... | @@ -790,9 +790,9 @@ pub fn addCases(ctx: *TestContext) !void { |
| 790 | 790 | "tmp.zig:1:17: note: function cannot return an error", |
| 791 | 791 | "tmp.zig:8:5: error: expected type 'void', found '@typeInfo(@typeInfo(@TypeOf(bar)).Fn.return_type.?).ErrorUnion.error_set'", |
| 792 | 792 | "tmp.zig:7:17: note: function cannot return an error", |
| 793 | | "tmp.zig:11:15: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(bar)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 793 | "tmp.zig:11:15: error: cannot convert error union to payload type. consider using `try`, `catch`, or `if`. expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(bar)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 794 | 794 | "tmp.zig:10:17: note: function cannot return an error", |
| 795 | | "tmp.zig:15:14: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(bar)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 795 | "tmp.zig:15:14: error: cannot convert error union to payload type. consider using `try`, `catch`, or `if`. expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(bar)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 796 | 796 | "tmp.zig:14:5: note: cannot store an error in type 'u32'", |
| 797 | 797 | }); |
| 798 | 798 | |
| ... | ... | @@ -1879,7 +1879,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1879 | 1879 | \\ _ = afoo; |
| 1880 | 1880 | \\} |
| 1881 | 1881 | , &[_][]const u8{ |
| 1882 | | "tmp.zig:12:25: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(get_uval)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 1882 | "tmp.zig:12:25: error: cannot convert error union to payload type. consider using `try`, `catch`, or `if`. expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(get_uval)).Fn.return_type.?).ErrorUnion.error_set!u32'", |
| 1883 | 1883 | }); |
| 1884 | 1884 | |
| 1885 | 1885 | ctx.objErrStage1("assigning to struct or union fields that are not optionals with a function that returns an optional", |
| ... | ... | @@ -1899,7 +1899,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1899 | 1899 | \\ _ = s; |
| 1900 | 1900 | \\} |
| 1901 | 1901 | , &[_][]const u8{ |
| 1902 | | "tmp.zig:11:27: error: expected type 'u8', found '?u8'", |
| 1902 | "tmp.zig:11:27: error: cannot convert optional to payload type. consider using `.?`, `orelse`, or `if`. expected type 'u8', found '?u8'", |
| 1903 | 1903 | }); |
| 1904 | 1904 | |
| 1905 | 1905 | ctx.objErrStage1("missing result type for phi node", |
| ... | ... | @@ -2308,7 +2308,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2308 | 2308 | \\ not_optional: i32, |
| 2309 | 2309 | \\}; |
| 2310 | 2310 | , &[_][]const u8{ |
| 2311 | | "tmp.zig:3:36: error: expected type 'i32', found '?i32'", |
| 2311 | "tmp.zig:3:36: error: cannot convert optional to payload type. consider using `.?`, `orelse`, or `if`. expected type 'i32', found '?i32'", |
| 2312 | 2312 | }); |
| 2313 | 2313 | |
| 2314 | 2314 | ctx.objErrStage1("result location incompatibility mismatching handle_is_ptr", |
| ... | ... | @@ -2325,7 +2325,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2325 | 2325 | \\ not_optional: i32, |
| 2326 | 2326 | \\}; |
| 2327 | 2327 | , &[_][]const u8{ |
| 2328 | | "tmp.zig:3:36: error: expected type 'i32', found '?i32'", |
| 2328 | "tmp.zig:3:36: error: cannot convert optional to payload type. consider using `.?`, `orelse`, or `if`. expected type 'i32', found '?i32'", |
| 2329 | 2329 | }); |
| 2330 | 2330 | |
| 2331 | 2331 | ctx.objErrStage1("const frame cast to anyframe", |
| ... | ... | @@ -8828,7 +8828,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 8828 | 8828 | \\ v = u; |
| 8829 | 8829 | \\} |
| 8830 | 8830 | , &[_][]const u8{ |
| 8831 | | "tmp.zig:4:9: error: expected type '*anyopaque', found '?*anyopaque'", |
| 8831 | "tmp.zig:4:9: error: cannot convert optional to payload type. consider using `.?`, `orelse`, or `if`. expected type '*anyopaque', found '?*anyopaque'", |
| 8832 | 8832 | }); |
| 8833 | 8833 | |
| 8834 | 8834 | ctx.objErrStage1("Issue #6823: don't allow .* to be followed by **", |