ability to call external variadic functions

This commit is contained in:
Andrew Kelley
2015-12-09 01:03:04 -07:00
parent 4eff5f114b
commit dfda85e870
10 changed files with 121 additions and 29 deletions

View File

@@ -577,6 +577,11 @@ fn f() {
".tmp_source.zig:5:8: error: array subscripts must be integers",
".tmp_source.zig:5:19: error: array access of non-array",
".tmp_source.zig:5:19: error: array subscripts must be integers");
add_compile_fail_case("variadic functions only allowed in extern", R"SOURCE(
fn f(...) {}
)SOURCE", 1, ".tmp_source.zig:2:1: error: variadic arguments only allowed in extern functions");
}
static void print_compiler_invocation(TestCase *test_case, Buf *zig_stderr) {