Commit 30194f27fb

Andrew Kelley <andrew@ziglang.org>
2020-02-19 00:27:18
update new test case to take into account lazy `@typeInfo`
1 parent eb5e625
Changed files (1)
test/compile_errors.zig
@@ -3,10 +3,10 @@ const builtin = @import("builtin");
 const Target = @import("std").Target;
 
 pub fn addCases(cases: *tests.CompileErrorContext) void {
-    cases.addTest("",
+    cases.addTest("access invalid @typeInfo decl",
         \\const A = B;
         \\test "Crash" {
-        \\    _ = @typeInfo(@This()).Struct.decls;
+        \\    _ = @typeInfo(@This()).Struct.decls[0];
         \\}
     , &[_][]const u8{
         "tmp.zig:1:11: error: use of undeclared identifier 'B'",