authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-21 02:00:14-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-21 02:10:22-04:00
logc4840d78fb0a1a5018e5d66cb7c5e76a080783c2
tree02851169179420373f8e9576104c2e25dd9a9d57
parent1098545e475d0147d3f8b3031ed116be25c8e2bf

add test case for #936


1 files changed, 5 insertions(+), 0 deletions(-)

test/compile_errors.zig+5
...@@ -1,6 +1,11 @@...@@ -1,6 +1,11 @@
1const tests = @import("tests.zig");1const tests = @import("tests.zig");
22
3pub fn addCases(cases: &tests.CompileErrorContext) void {3pub fn addCases(cases: &tests.CompileErrorContext) void {
4 cases.add("invalid field access in comptime",
5 \\comptime { var x = doesnt_exist.whatever; }
6 ,
7 ".tmp_source.zig:1:20: error: use of undeclared identifier 'doesnt_exist'");
8
4 cases.add("suspend inside suspend block",9 cases.add("suspend inside suspend block",
5 \\const std = @import("std");10 \\const std = @import("std");
6 \\11 \\