diff options
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index a18884cc9a..e9fe6f589c 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -2,6 +2,15 @@ const tests = @import("tests.zig"); pub fn addCases(cases: *tests.CompileErrorContext) void { cases.addTest( + "export generic function", + \\export fn foo(num: var) i32 { + \\ return 0; + \\} + , + ".tmp_source.zig:1:15: error: parameter of type 'var' not allowed in function with calling convention 'ccc'", + ); + + cases.addTest( "C pointer to c_void", \\export fn a() void { \\ var x: *c_void = undefined; |
