aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-13 22:18:10 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-13 22:18:10 -0700
commitd121ed961ac9fa58a5a6e2695dc62dbb01c60523 (patch)
tree3fc57be0778594803afac274c83df3736bce7d5a /test/run_tests.cpp
parent95a7f3553d21bd70fedf20adbf10d1edaa13a76c (diff)
downloadzig-d121ed961ac9fa58a5a6e2695dc62dbb01c60523.tar.gz
zig-d121ed961ac9fa58a5a6e2695dc62dbb01c60523.zip
fix noalias codegen
also make some parsing error messages better
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index 04cf942c37..71bef5309c 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1396,6 +1396,10 @@ fn f() @bogus(foo) => {
const a : @typeof(b) = 0;
const b : @typeof(a) = 0;
)SOURCE", 1, ".tmp_source.zig:3:19: error: use of undeclared identifier 'a'");
+
+ add_compile_fail_case("noalias on non pointer param", R"SOURCE(
+fn f(noalias x: i32) => {}
+ )SOURCE", 1, ".tmp_source.zig:2:6: error: noalias on non-pointer parameter");
}
static void print_compiler_invocation(TestCase *test_case) {