aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-01-05 04:03:25 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-01-05 04:03:25 -0500
commited21be011a57b6aa48470168315d86b5f93d29ea (patch)
tree6999b8a8f24bb9bb6a3659999154b5a8344736bb /test/run_tests.cpp
parent438feebbcf687db47ff4a4be71a67b8587b2d987 (diff)
downloadzig-ed21be011a57b6aa48470168315d86b5f93d29ea.tar.gz
zig-ed21be011a57b6aa48470168315d86b5f93d29ea.zip
pass unreachable variable test
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index f0d9ea3734..5d05245888 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -771,11 +771,11 @@ fn f() {
fn f() {
const a = return;
}
- )SOURCE", 1, ".tmp_source.zig:3:5: error: variable initialization is unreachable");
+ )SOURCE", 1, ".tmp_source.zig:3:5: error: unreachable code");
add_compile_fail_case("unreachable variable", R"SOURCE(
fn f() {
- const a : unreachable = return;
+ const a : unreachable = {};
}
)SOURCE", 1, ".tmp_source.zig:3:15: error: variable of type 'unreachable' not allowed");