aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index f41e44562a..940c92769c 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1859,6 +1859,13 @@ fn f(foo: Foo, index: i32) {
const result = members[index]();
}
)SOURCE", 1, ".tmp_source.zig:21:34: error: expected 1 arguments, got 0");
+
+ add_compile_fail_case("missing function name and param name", R"SOURCE(
+fn () {}
+fn f(i32) {}
+ )SOURCE", 2,
+ ".tmp_source.zig:2:1: error: missing function name",
+ ".tmp_source.zig:3:6: error: missing parameter name");
}
//////////////////////////////////////////////////////////////////////////////