From 30194f27fb5521b11442f1d13474eac3915051d7 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 18 Feb 2020 18:27:18 -0500 Subject: [PATCH] update new test case to take into account lazy `@typeInfo` --- test/compile_errors.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/compile_errors.zig b/test/compile_errors.zig index dd688e6c10ee898e9d4151da9e07904b7cf96814..c5f5b6f9dab229c9cd615f294a71db8635415539 100644 --- a/test/compile_errors.zig +++ b/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'", -- 2.54.0