aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/run_tests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index a7085a48af..bbf1fd2168 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1495,6 +1495,12 @@ pub fn f() {
add_compile_fail_case("main function with bogus args type", R"SOURCE(
pub fn main(args: [][]bogus) -> %void {}
)SOURCE", 1, ".tmp_source.zig:2:23: error: use of undeclared identifier 'bogus'");
+
+ add_compile_fail_case("main function with bogus args type", R"SOURCE(
+fn foo(blah: []u8) {
+ for (blah) { }
+}
+ )SOURCE", 1, ".tmp_source.zig:3:16: error: for loop expression missing element parameter");
}
//////////////////////////////////////////////////////////////////////////////