| ... | ... | @@ -1201,7 +1201,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1201 | 1201 | \\} |
| 1202 | 1202 | , &[_][]const u8{ |
| 1203 | 1203 | ":3:1: error: redeclaration of 'entry'", |
| 1204 | | ":2:1: note: previously declared here", |
| 1204 | ":2:1: note: other declaration here", |
| 1205 | 1205 | ":6:9: error: local shadows declaration of 'foo'", |
| 1206 | 1206 | ":5:1: note: declared here", |
| 1207 | 1207 | }); |
| ... | ... | @@ -1211,8 +1211,8 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1211 | 1211 | \\var foo = false; |
| 1212 | 1212 | \\var foo = true; |
| 1213 | 1213 | , &[_][]const u8{ |
| 1214 | | ":3:5: error: redeclaration of 'foo'", |
| 1215 | | ":2:1: note: previously declared here", |
| 1214 | ":3:1: error: redeclaration of 'foo'", |
| 1215 | ":2:1: note: other declaration here", |
| 1216 | 1216 | }); |
| 1217 | 1217 | |
| 1218 | 1218 | ctx.compileError("compileError", linux_x64, |
| ... | ... | @@ -1231,8 +1231,8 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1231 | 1231 | \\ unreachable; |
| 1232 | 1232 | \\} |
| 1233 | 1233 | , &[_][]const u8{ |
| 1234 | | ":3:9: error: redefinition of 'i'", |
| 1235 | | ":2:9: note: previous definition is here", |
| 1234 | ":3:9: error: redeclaration of 'i'", |
| 1235 | ":2:9: note: previously declared here", |
| 1236 | 1236 | }); |
| 1237 | 1237 | case.addError( |
| 1238 | 1238 | \\var testing: i64 = 10; |
| ... | ... | @@ -1240,7 +1240,10 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1240 | 1240 | \\ var testing: i64 = 20; |
| 1241 | 1241 | \\ unreachable; |
| 1242 | 1242 | \\} |
| 1243 | | , &[_][]const u8{":3:9: error: redefinition of 'testing'"}); |
| 1243 | , &[_][]const u8{ |
| 1244 | ":3:9: error: local shadows declaration of 'testing'", |
| 1245 | ":1:1: note: declared here", |
| 1246 | }); |
| 1244 | 1247 | } |
| 1245 | 1248 | |
| 1246 | 1249 | { |
| ... | ... | @@ -1421,10 +1424,12 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1421 | 1424 | { |
| 1422 | 1425 | var case = ctx.exe("bad inferred variable type", linux_x64); |
| 1423 | 1426 | case.addError( |
| 1424 | | \\export fn foo() void { |
| 1427 | \\pub fn main() void { |
| 1425 | 1428 | \\ var x = null; |
| 1426 | 1429 | \\} |
| 1427 | | , &[_][]const u8{":2:9: error: variable of type '@Type(.Null)' must be const or comptime"}); |
| 1430 | , &[_][]const u8{ |
| 1431 | ":2:9: error: variable of type '@Type(.Null)' must be const or comptime", |
| 1432 | }); |
| 1428 | 1433 | } |
| 1429 | 1434 | |
| 1430 | 1435 | { |