aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 62aa7d46f2..f89dea1921 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -2,6 +2,19 @@ const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
+ "invalid type used in array type",
+ \\const Item = struct {
+ \\ field: SomeNonexistentType,
+ \\};
+ \\var items: [100]Item = undefined;
+ \\export fn entry() void {
+ \\ const a = items[0];
+ \\}
+ ,
+ ".tmp_source.zig:2:12: error: use of undeclared identifier 'SomeNonexistentType'",
+ );
+
+ cases.add(
"@noInlineCall on an inline function",
\\inline fn foo() void {}
\\