authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-09 22:44:23-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-09 22:44:23-05:00
log27575d19c805e166d8393e3c586613256eb0c6e3
treeda14133cfbcd961a28b9a831c6085d78b8766b6f
parentacdf4048b478f500edd13c6e50ca52376ce55a12
signaturelock-open Commit is signed but in an unrecognized format.

avoid conflict with master branch


1 files changed, 6 insertions(+), 6 deletions(-)

test/compile_errors.zig+6-6
...@@ -3,6 +3,12 @@ const builtin = @import("builtin");...@@ -3,6 +3,12 @@ const builtin = @import("builtin");
3const Target = @import("std").Target;3const Target = @import("std").Target;
44
5pub fn addCases(cases: *tests.CompileErrorContext) void {5pub fn addCases(cases: *tests.CompileErrorContext) void {
6 cases.addTest("dependency loop in top-level decl with @TypeInfo",
7 \\export const foo = @typeInfo(@This());
8 , &[_][]const u8{
9 "tmp.zig:1:20: error: dependency loop detected",
10 });
11
6 cases.add("function call assigned to incorrect type",12 cases.add("function call assigned to incorrect type",
7 \\export fn entry() void {13 \\export fn entry() void {
8 \\ var arr: [4]f32 = undefined;14 \\ var arr: [4]f32 = undefined;
...@@ -27,12 +33,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {...@@ -27,12 +33,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
27 "tmp.zig:3:18: error: expected type '[]i32', found 'anyerror!i32",33 "tmp.zig:3:18: error: expected type '[]i32', found 'anyerror!i32",
28 });34 });
2935
30 cases.addTest("dependency loop in top-level decl with @TypeInfo",
31 \\export const foo = @typeInfo(@This());
32 , &[_][]const u8{
33 "tmp.zig:1:20: error: dependency loop detected",
34 });
35
36 cases.addTest("non-exhaustive enums",36 cases.addTest("non-exhaustive enums",
37 \\const A = enum {37 \\const A = enum {
38 \\ a,38 \\ a,