Fix type cycle bug

This commit is contained in:
gingerBill
2018-03-23 15:23:14 +00:00
parent fff4ead96a
commit 5bf0f9d630
8 changed files with 83 additions and 41 deletions

View File

@@ -217,6 +217,7 @@ struct Type {
};
// TODO(bill): Should I add extra information here specifying the kind of selection?
// e.g. field, constant, array field, type field, etc.
struct Selection {
@@ -481,12 +482,6 @@ Type *alloc_type(gbAllocator a, TypeKind kind) {
}
Type *make_type_basic(gbAllocator a, BasicType basic) {
Type *t = alloc_type(a, Type_Basic);
t->Basic = basic;
return t;
}
Type *make_type_generic(gbAllocator a, Scope *scope, i64 id, String name, Type *specialized) {
Type *t = alloc_type(a, Type_Generic);
t->Generic.id = id;