| ... | ... | @@ -156,7 +156,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 156 | 156 | "tmp.zig:9:27: error: @atomicRmw on enum only works with .Xchg", |
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | | cases.add( |
| 159 | cases.addExe( |
| 160 | 160 | "disallow coercion from non-null-terminated pointer to null-terminated pointer", |
| 161 | 161 | \\extern fn puts(s: [*:0]const u8) c_int; |
| 162 | 162 | \\pub fn main() void { |
| ... | ... | @@ -876,7 +876,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 876 | 876 | "tmp.zig:3:32: note: cast discards const qualifier", |
| 877 | 877 | ); |
| 878 | 878 | |
| 879 | | cases.add( |
| 879 | cases.addExe( |
| 880 | 880 | "overflow in enum value allocation", |
| 881 | 881 | \\const Moo = enum(u8) { |
| 882 | 882 | \\ Last = 255, |
| ... | ... | @@ -3000,14 +3000,14 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 3000 | 3000 | "tmp.zig:3:9: error: encountered @panic at compile-time", |
| 3001 | 3001 | ); |
| 3002 | 3002 | |
| 3003 | | cases.add( |
| 3003 | cases.addExe( |
| 3004 | 3004 | "wrong return type for main", |
| 3005 | 3005 | \\pub fn main() f32 { } |
| 3006 | 3006 | , |
| 3007 | 3007 | "error: expected return type of main to be 'void', '!void', 'noreturn', 'u8', or '!u8'", |
| 3008 | 3008 | ); |
| 3009 | 3009 | |
| 3010 | | cases.add( |
| 3010 | cases.addExe( |
| 3011 | 3011 | "double ?? on main return value", |
| 3012 | 3012 | \\pub fn main() ??void { |
| 3013 | 3013 | \\} |
| ... | ... | @@ -4900,7 +4900,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 4900 | 4900 | "tmp.zig:3:13: error: cannot assign to constant", |
| 4901 | 4901 | ); |
| 4902 | 4902 | |
| 4903 | | cases.add( |
| 4903 | cases.addExe( |
| 4904 | 4904 | "main function with bogus args type", |
| 4905 | 4905 | \\pub fn main(args: [][]bogus) !void {} |
| 4906 | 4906 | , |
| ... | ... | @@ -5718,7 +5718,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 5718 | 5718 | "tmp.zig:4:13: error: cannot continue out of defer expression", |
| 5719 | 5719 | ); |
| 5720 | 5720 | |
| 5721 | | cases.add( |
| 5721 | cases.addExe( |
| 5722 | 5722 | "calling a var args function only known at runtime", |
| 5723 | 5723 | \\var foos = [_]fn(...) void { foo1, foo2 }; |
| 5724 | 5724 | \\ |
| ... | ... | @@ -5732,7 +5732,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 5732 | 5732 | "tmp.zig:7:9: error: calling a generic function requires compile-time known function value", |
| 5733 | 5733 | ); |
| 5734 | 5734 | |
| 5735 | | cases.add( |
| 5735 | cases.addExe( |
| 5736 | 5736 | "calling a generic function only known at runtime", |
| 5737 | 5737 | \\var foos = [_]fn(var) void { foo1, foo2 }; |
| 5738 | 5738 | \\ |
| ... | ... | @@ -6850,7 +6850,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 6850 | 6850 | "tmp.zig:3:23: error: vector element type must be integer, float, bool, or pointer; 'comptime_int' is invalid", |
| 6851 | 6851 | ); |
| 6852 | 6852 | |
| 6853 | | cases.add("compileLog of tagged enum doesn't crash the compiler", |
| 6853 | cases.addExe("compileLog of tagged enum doesn't crash the compiler", |
| 6854 | 6854 | \\const Bar = union(enum(u32)) { |
| 6855 | 6855 | \\ X: i32 = 1 |
| 6856 | 6856 | \\}; |