This commit is contained in:
Andrew Kelley 2019-02-18 18:11:30 -05:00
parent b0ceea1831
commit ea3d9d5c53
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -1,6 +1,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 {