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

@@ -984,7 +984,9 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
}
add_entity_use(c, n, e);
check_entity_decl(c, e, nullptr, named_type);
if (e->state == EntityState_Unresolved) {
check_entity_decl(c, e, nullptr, named_type);
}
if (e->type == nullptr) {