zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 759485cc328a4e6f2aba58891e86234c660797b6 (tree)
parent b46d764fd958d31a988d58a6ee0b7da4c0b20acb
Author: Tadeo Kondrak <me@tadeo.ca>
Date:   Wed, 19 Aug 2020 15:26:03 -0600

Update compile-errors test for @Type(.Struct)

Diffstat:
Mtest/compile_errors.zig | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/compile_errors.zig b/test/compile_errors.zig @@ -1395,12 +1395,12 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { "tmp.zig:3:36: error: expected type 'std.builtin.TypeInfo', found 'std.builtin.Int'", }); - cases.add("Struct unavailable for @Type", + cases.add("struct with declarations unavailable for @Type", \\export fn entry() void { - \\ _ = @Type(@typeInfo(struct { })); + \\ _ = @Type(@typeInfo(struct { const foo = 1; })); \\} , &[_][]const u8{ - "tmp.zig:2:15: error: @Type not available for 'TypeInfo.Struct'", + "tmp.zig:2:15: error: TypeInfo.Struct.decls must be empty for @Type", }); cases.add("wrong type for argument tuple to @asyncCall",