| ... | ... | @@ -412,7 +412,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 412 | 412 | \\} |
| 413 | 413 | , &[_][]const u8{ |
| 414 | 414 | "tmp.zig:15:23: error: enum field missing: 'arst'", |
| 415 | | "tmp.zig:27:24: note: referenced here", |
| 416 | 415 | }); |
| 417 | 416 | |
| 418 | 417 | ctx.objErrStage1("field access of opaque type", |
| ... | ... | @@ -505,7 +504,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 505 | 504 | \\} |
| 506 | 505 | , &[_][]const u8{ |
| 507 | 506 | "tmp.zig:2:25: error: opaque types have unknown size and therefore cannot be directly embedded in unions", |
| 508 | | "tmp.zig:13:17: note: referenced here", |
| 509 | 507 | }); |
| 510 | 508 | |
| 511 | 509 | ctx.objErrStage1("slice sentinel mismatch", |
| ... | ... | @@ -541,7 +539,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 541 | 539 | \\} |
| 542 | 540 | , &[_][]const u8{ |
| 543 | 541 | "tmp.zig:2:25: error: unions must have 1 or more fields", |
| 544 | | "tmp.zig:11:17: note: referenced here", |
| 545 | 542 | }); |
| 546 | 543 | |
| 547 | 544 | ctx.objErrStage1("@Type for exhaustive enum with zero fields", |
| ... | ... | @@ -560,7 +557,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 560 | 557 | \\} |
| 561 | 558 | , &[_][]const u8{ |
| 562 | 559 | "tmp.zig:2:20: error: enums must have 1 or more fields", |
| 563 | | "tmp.zig:12:9: note: referenced here", |
| 564 | 560 | }); |
| 565 | 561 | |
| 566 | 562 | ctx.objErrStage1("@Type for tagged union with extra union field", |
| ... | ... | @@ -596,7 +592,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 596 | 592 | , &[_][]const u8{ |
| 597 | 593 | "tmp.zig:14:23: error: enum field not found: 'arst'", |
| 598 | 594 | "tmp.zig:2:20: note: enum declared here", |
| 599 | | "tmp.zig:27:24: note: referenced here", |
| 600 | 595 | }); |
| 601 | 596 | |
| 602 | 597 | ctx.objErrStage1("@Type with undefined", |
| ... | ... | @@ -812,9 +807,7 @@ pub fn addCases(ctx: *TestContext) !void { |
| 812 | 807 | \\} |
| 813 | 808 | , &[_][]const u8{ |
| 814 | 809 | "tmp.zig:3:35: error: unable to evaluate constant expression", |
| 815 | | "tmp.zig:3:9: note: referenced here", |
| 816 | 810 | "tmp.zig:7:37: error: unable to evaluate constant expression", |
| 817 | | "tmp.zig:7:9: note: referenced here", |
| 818 | 811 | }); |
| 819 | 812 | |
| 820 | 813 | ctx.objErrStage1("extern variable has no type", |
| ... | ... | @@ -911,13 +904,9 @@ pub fn addCases(ctx: *TestContext) !void { |
| 911 | 904 | \\} |
| 912 | 905 | , &[_][]const u8{ |
| 913 | 906 | "tmp.zig:3:32: error: unable to evaluate constant expression", |
| 914 | | "tmp.zig:3:9: note: referenced here", |
| 915 | 907 | "tmp.zig:7:21: error: expected float type, found 'u32'", |
| 916 | | "tmp.zig:7:9: note: referenced here", |
| 917 | 908 | "tmp.zig:11:26: error: expected float type, found 'u32'", |
| 918 | | "tmp.zig:11:9: note: referenced here", |
| 919 | 909 | "tmp.zig:15:23: error: expected integer type, found 'f32'", |
| 920 | | "tmp.zig:15:9: note: referenced here", |
| 921 | 910 | }); |
| 922 | 911 | |
| 923 | 912 | ctx.testErrStage1("invalid float casts", |
| ... | ... | @@ -939,13 +928,9 @@ pub fn addCases(ctx: *TestContext) !void { |
| 939 | 928 | \\} |
| 940 | 929 | , &[_][]const u8{ |
| 941 | 930 | "tmp.zig:3:36: error: unable to evaluate constant expression", |
| 942 | | "tmp.zig:3:9: note: referenced here", |
| 943 | 931 | "tmp.zig:7:21: error: expected integer type, found 'f32'", |
| 944 | | "tmp.zig:7:9: note: referenced here", |
| 945 | 932 | "tmp.zig:11:26: error: expected int type, found 'f32'", |
| 946 | | "tmp.zig:11:9: note: referenced here", |
| 947 | 933 | "tmp.zig:15:25: error: expected float type, found 'u32'", |
| 948 | | "tmp.zig:15:9: note: referenced here", |
| 949 | 934 | }); |
| 950 | 935 | |
| 951 | 936 | ctx.testErrStage1("invalid assignments", |
| ... | ... | @@ -1218,7 +1203,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1218 | 1203 | \\export const foo = @typeInfo(@This()).Struct.decls; |
| 1219 | 1204 | , &[_][]const u8{ |
| 1220 | 1205 | "tmp.zig:1:20: error: dependency loop detected", |
| 1221 | | "tmp.zig:1:45: note: referenced here", |
| 1222 | 1206 | }); |
| 1223 | 1207 | |
| 1224 | 1208 | ctx.objErrStage1("function call assigned to incorrect type", |
| ... | ... | @@ -2154,7 +2138,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2154 | 2138 | \\} |
| 2155 | 2139 | , &[_][]const u8{ |
| 2156 | 2140 | "tmp.zig:2:21: error: shift amount has to be an integer type, but found '*const u8'", |
| 2157 | | "tmp.zig:2:17: note: referenced here", |
| 2158 | 2141 | }); |
| 2159 | 2142 | |
| 2160 | 2143 | ctx.objErrStage1("bit shifting only works on integer types", |
| ... | ... | @@ -2164,7 +2147,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2164 | 2147 | \\} |
| 2165 | 2148 | , &[_][]const u8{ |
| 2166 | 2149 | "tmp.zig:2:16: error: bit shifting operation expected integer type, found '*const u8'", |
| 2167 | | "tmp.zig:2:27: note: referenced here", |
| 2168 | 2150 | }); |
| 2169 | 2151 | |
| 2170 | 2152 | ctx.objErrStage1("struct depends on itself via optional field", |
| ... | ... | @@ -2461,7 +2443,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2461 | 2443 | , &[_][]const u8{ |
| 2462 | 2444 | "tmp.zig:4:1: error: unable to determine async function frame of 'amain'", |
| 2463 | 2445 | "tmp.zig:5:10: note: analysis of function 'other' depends on the frame", |
| 2464 | | "tmp.zig:8:13: note: referenced here", |
| 2465 | 2446 | }); |
| 2466 | 2447 | |
| 2467 | 2448 | ctx.objErrStage1("async function depends on its own frame", |
| ... | ... | @@ -2474,7 +2455,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2474 | 2455 | \\} |
| 2475 | 2456 | , &[_][]const u8{ |
| 2476 | 2457 | "tmp.zig:4:1: error: cannot resolve '@Frame(amain)': function not fully analyzed yet", |
| 2477 | | "tmp.zig:5:13: note: referenced here", |
| 2478 | 2458 | }); |
| 2479 | 2459 | |
| 2480 | 2460 | ctx.objErrStage1("non async function pointer passed to @asyncCall", |
| ... | ... | @@ -2697,7 +2677,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2697 | 2677 | \\} |
| 2698 | 2678 | , &[_][]const u8{ |
| 2699 | 2679 | "tmp.zig:1:29: error: evaluation exceeded 1000 backwards branches", |
| 2700 | | "tmp.zig:5:18: note: referenced here", |
| 2701 | 2680 | }); |
| 2702 | 2681 | |
| 2703 | 2682 | ctx.objErrStage1("@ptrToInt 0 to non optional pointer", |
| ... | ... | @@ -2874,7 +2853,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2874 | 2853 | \\} |
| 2875 | 2854 | , &[_][]const u8{ |
| 2876 | 2855 | "tmp.zig:1:13: error: struct 'Foo' depends on itself", |
| 2877 | | "tmp.zig:8:28: note: referenced here", |
| 2878 | 2856 | }); |
| 2879 | 2857 | |
| 2880 | 2858 | ctx.objErrStage1("enum field value references enum", |
| ... | ... | @@ -2900,8 +2878,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 2900 | 2878 | \\} |
| 2901 | 2879 | , &[_][]const u8{ |
| 2902 | 2880 | "tmp.zig:2:19: error: dependency loop detected", |
| 2903 | | "tmp.zig:1:19: note: referenced here", |
| 2904 | | "tmp.zig:4:15: note: referenced here", |
| 2905 | 2881 | }); |
| 2906 | 2882 | |
| 2907 | 2883 | ctx.testErrStage1("not an enum type", |
| ... | ... | @@ -5835,7 +5811,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 5835 | 5811 | \\export fn entry() usize { return @sizeOf(@TypeOf(y)); } |
| 5836 | 5812 | , &[_][]const u8{ |
| 5837 | 5813 | "tmp.zig:3:14: error: division by zero", |
| 5838 | | "tmp.zig:1:14: note: referenced here", |
| 5839 | 5814 | }); |
| 5840 | 5815 | |
| 5841 | 5816 | ctx.objErrStage1("branch on undefined value", |
| ... | ... | @@ -6216,8 +6191,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6216 | 6191 | \\export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); } |
| 6217 | 6192 | , &[_][]const u8{ |
| 6218 | 6193 | "tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches", |
| 6219 | | "tmp.zig:1:37: note: referenced here", |
| 6220 | | "tmp.zig:6:50: note: referenced here", |
| 6221 | 6194 | }); |
| 6222 | 6195 | |
| 6223 | 6196 | ctx.objErrStage1("@embedFile with bogus file", |
| ... | ... | @@ -6254,7 +6227,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6254 | 6227 | \\export fn entry() usize { return @sizeOf(@TypeOf(a)); } |
| 6255 | 6228 | , &[_][]const u8{ |
| 6256 | 6229 | "tmp.zig:6:26: error: unable to evaluate constant expression", |
| 6257 | | "tmp.zig:4:17: note: referenced here", |
| 6258 | 6230 | }); |
| 6259 | 6231 | |
| 6260 | 6232 | ctx.objErrStage1("undeclared identifier error should mark fn as impure", |
| ... | ... | @@ -6332,7 +6304,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6332 | 6304 | \\export fn entry() usize { return @sizeOf(@TypeOf(y)); } |
| 6333 | 6305 | , &[_][]const u8{ |
| 6334 | 6306 | "tmp.zig:3:12: error: negation caused overflow", |
| 6335 | | "tmp.zig:1:14: note: referenced here", |
| 6336 | 6307 | }); |
| 6337 | 6308 | |
| 6338 | 6309 | ctx.objErrStage1("add overflow in function evaluation", |
| ... | ... | @@ -6344,7 +6315,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6344 | 6315 | \\export fn entry() usize { return @sizeOf(@TypeOf(y)); } |
| 6345 | 6316 | , &[_][]const u8{ |
| 6346 | 6317 | "tmp.zig:3:14: error: operation caused overflow", |
| 6347 | | "tmp.zig:1:14: note: referenced here", |
| 6348 | 6318 | }); |
| 6349 | 6319 | |
| 6350 | 6320 | ctx.objErrStage1("sub overflow in function evaluation", |
| ... | ... | @@ -6356,7 +6326,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6356 | 6326 | \\export fn entry() usize { return @sizeOf(@TypeOf(y)); } |
| 6357 | 6327 | , &[_][]const u8{ |
| 6358 | 6328 | "tmp.zig:3:14: error: operation caused overflow", |
| 6359 | | "tmp.zig:1:14: note: referenced here", |
| 6360 | 6329 | }); |
| 6361 | 6330 | |
| 6362 | 6331 | ctx.objErrStage1("mul overflow in function evaluation", |
| ... | ... | @@ -6368,7 +6337,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6368 | 6337 | \\export fn entry() usize { return @sizeOf(@TypeOf(y)); } |
| 6369 | 6338 | , &[_][]const u8{ |
| 6370 | 6339 | "tmp.zig:3:14: error: operation caused overflow", |
| 6371 | | "tmp.zig:1:14: note: referenced here", |
| 6372 | 6340 | }); |
| 6373 | 6341 | |
| 6374 | 6342 | ctx.objErrStage1("truncate sign mismatch", |
| ... | ... | @@ -6455,7 +6423,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6455 | 6423 | \\} |
| 6456 | 6424 | , &[_][]const u8{ |
| 6457 | 6425 | "tmp.zig:3:7: error: unable to evaluate constant expression", |
| 6458 | | "tmp.zig:16:19: note: referenced here", |
| 6459 | 6426 | }); |
| 6460 | 6427 | |
| 6461 | 6428 | ctx.objErrStage1("bogus method call on slice", |
| ... | ... | @@ -6779,7 +6746,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 6779 | 6746 | \\} |
| 6780 | 6747 | , &[_][]const u8{ |
| 6781 | 6748 | "tmp.zig:10:14: error: reached unreachable code", |
| 6782 | | "tmp.zig:6:20: note: referenced here", |
| 6783 | 6749 | }); |
| 6784 | 6750 | |
| 6785 | 6751 | ctx.objErrStage1("control flow uses comptime var at runtime", |
| ... | ... | @@ -7280,8 +7246,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 7280 | 7246 | \\} |
| 7281 | 7247 | , &[_][]const u8{ |
| 7282 | 7248 | "tmp.zig:1:13: error: aoeu", |
| 7283 | | "tmp.zig:3:19: note: referenced here", |
| 7284 | | "tmp.zig:7:12: note: referenced here", |
| 7285 | 7249 | }); |
| 7286 | 7250 | |
| 7287 | 7251 | ctx.objErrStage1("float literal too large error", |
| ... | ... | @@ -8205,7 +8169,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 8205 | 8169 | \\} |
| 8206 | 8170 | , &[_][]const u8{ |
| 8207 | 8171 | "tmp.zig:3:53: error: vector element type must be integer, float, bool, or pointer; '@Vector(4, u8)' is invalid", |
| 8208 | | "tmp.zig:3:16: note: referenced here", |
| 8209 | 8172 | }); |
| 8210 | 8173 | |
| 8211 | 8174 | ctx.testErrStage1("bad @splat type", |
| ... | ... | @@ -8403,7 +8366,6 @@ pub fn addCases(ctx: *TestContext) !void { |
| 8403 | 8366 | , &[_][]const u8{ |
| 8404 | 8367 | "tmp.zig:3:42: error: unable to @bitCast from pointer type '*[2]u8'", |
| 8405 | 8368 | "tmp.zig:8:32: error: destination type 'u16' has size 2 but source type '[]const u8' has size 16", |
| 8406 | | "tmp.zig:8:37: note: referenced here", |
| 8407 | 8369 | }); |
| 8408 | 8370 | |
| 8409 | 8371 | // issue #7810 |