aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-08-20 16:57:10 -0400
committerGitHub <noreply@github.com>2020-08-20 16:57:10 -0400
commit776bfb0ee6ccd3c8f4b15834c3c40e5f5d731f79 (patch)
tree8621a07362fc0efda75f1b33cb073157654407f3 /test/compile_errors.zig
parent1a4059ed88740c0289b7fea5735115fa9481a8e5 (diff)
parent8126421d07da21f0d404ec481edfda85da0709fc (diff)
downloadzig-776bfb0ee6ccd3c8f4b15834c3c40e5f5d731f79.tar.gz
zig-776bfb0ee6ccd3c8f4b15834c3c40e5f5d731f79.zip
Merge pull request #6099 from tadeokondrak/@Type(.Struct)
Implement @Type for structs
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index fd74385d9b..ea0d3b4e7b 100644
--- 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",