More error checking for unresolved TLDs

Closes #4274
This commit is contained in:
LemonBoy
2020-01-23 22:40:12 +01:00
parent 357f42da6c
commit 8d9b8ab930
2 changed files with 34 additions and 16 deletions

View File

@@ -2,6 +2,12 @@ const tests = @import("tests.zig");
const builtin = @import("builtin");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.addTest("dependency loop in top-level decl with @TypeInfo",
\\export const foo = @typeInfo(@This());
, &[_][]const u8{
"tmp.zig:1:20: error: dependency loop detected",
});
cases.addTest("non-exhaustive enums",
\\const A = enum {
\\ a,