Fix (Crude) cyclic type checking for arrays and vectors

This commit is contained in:
Ginger Bill
2016-12-04 23:41:21 +00:00
parent c71b547cde
commit 8ec9811d7a
3 changed files with 100 additions and 33 deletions
+2 -1
View File
@@ -1465,11 +1465,12 @@ void check_parsed_files(Checker *c) {
}
}
// NOTE(bill): Check for illegal cyclic type declarations
for_array(i, c->info.definitions.entries) {
Entity *e = c->info.definitions.entries.e[i].value;
if (e->kind == Entity_TypeName) {
// i64 size = type_size_of(c->sizes, c->allocator, e->type);
i64 align = type_align_of(c->sizes, c->allocator, e->type);
GB_ASSERT(align > 0);
}
}
}