aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-04-21 02:00:14 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-04-21 02:10:22 -0400
commitc4840d78fb0a1a5018e5d66cb7c5e76a080783c2 (patch)
tree02851169179420373f8e9576104c2e25dd9a9d57 /test/compile_errors.zig
parent1098545e475d0147d3f8b3031ed116be25c8e2bf (diff)
downloadzig-c4840d78fb0a1a5018e5d66cb7c5e76a080783c2.tar.gz
zig-c4840d78fb0a1a5018e5d66cb7c5e76a080783c2.zip
add test case for #936
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 6ac73d18a2..2c4e35c562 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -1,6 +1,11 @@
const tests = @import("tests.zig");
pub fn addCases(cases: &tests.CompileErrorContext) void {
+ cases.add("invalid field access in comptime",
+ \\comptime { var x = doesnt_exist.whatever; }
+ ,
+ ".tmp_source.zig:1:20: error: use of undeclared identifier 'doesnt_exist'");
+
cases.add("suspend inside suspend block",
\\const std = @import("std");
\\