diff options
| author | gingerBill <bill@gingerbill.org> | 2018-03-23 15:23:14 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-03-23 15:23:14 +0000 |
| commit | 5bf0f9d630f16287f7977bbec1d85af9bcb432cf (patch) | |
| tree | a895fb66bc86417e3f70578cbe45218ac265464a /src/check_expr.cpp | |
| parent | fff4ead96ab7cab8091f990e6a947a08a23fd3a4 (diff) | |
Fix type cycle bug
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 925a69c43..fc040fd2f 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -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) { |