| ... | @@ -5033,13 +5033,18 @@ pub fn addCases(ctx: *TestContext) !void { | ... | @@ -5033,13 +5033,18 @@ pub fn addCases(ctx: *TestContext) !void { |
| 5033 | "tmp.zig:2:5: note: control flow is diverted here", | 5033 | "tmp.zig:2:5: note: control flow is diverted here", |
| 5034 | }); | 5034 | }); |
| 5035 | | 5035 | |
| 5036 | ctx.objErrStage1("unreachable code - return return", | 5036 | ctx.objErrStage1("unreachable code - multiple things", |
| 5037 | \\export fn a() i32 { | 5037 | \\export fn a() i32 { |
| 5038 | \\ return return 1; | 5038 | \\ return return 1; |
| 5039 | \\} | 5039 | \\} |
| | 5040 | \\export fn b(value: u32) bool { |
| | 5041 | \\ return 1 < value < 1000; |
| | 5042 | \\} |
| 5040 | , &[_][]const u8{ | 5043 | , &[_][]const u8{ |
| 5041 | "tmp.zig:2:5: error: unreachable code", | 5044 | "tmp.zig:2:5: error: unreachable code", |
| 5042 | "tmp.zig:2:12: note: control flow is diverted here", | 5045 | "tmp.zig:2:12: note: control flow is diverted here", |
| | 5046 | "tmp.zig:5:22: error: unreachable code", |
| | 5047 | "tmp.zig:5:5: note: control flow is diverted here", |
| 5043 | }); | 5048 | }); |
| 5044 | | 5049 | |
| 5045 | ctx.objErrStage1("bad import", | 5050 | ctx.objErrStage1("bad import", |