diff options
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 223646e767..3267ea7435 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,6 +1,13 @@ const tests = @import("tests.zig"); pub fn addCases(cases: &tests.CompileErrorContext) void { + cases.add("use invalid number literal as array index", + \\var v = 25; + \\export fn entry() void { + \\ var arr: [v]u8 = undefined; + \\} + , ".tmp_source.zig:1:1: error: unable to infer variable type"); + cases.add("duplicate struct field", \\const Foo = struct { \\ Bar: i32, |
