add test case for #936

This commit is contained in:
Andrew Kelley 2018-04-21 02:00:14 -04:00
parent 1098545e47
commit c4840d78fb

View file

@ -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");
\\