diff options
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 5c3e5f5257..973c158705 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -982,6 +982,12 @@ fn f() { continue; } )SOURCE", 1, ".tmp_source.zig:3:5: error: 'continue' expression not in loop"); + + add_compile_fail_case("invalid maybe type", R"SOURCE( +fn f() { + if (const x ?= true) { } +} + )SOURCE", 1, ".tmp_source.zig:3:20: error: expected maybe type"); } static void print_compiler_invocation(TestCase *test_case) { |
