diff options
| author | gingerBill <bill@gingerbill.org> | 2018-04-10 20:18:16 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-04-10 20:18:16 +0100 |
| commit | b83c3f265b72a5971e55b76ddf81cf33c68a2b57 (patch) | |
| tree | 3503e7b708695626a17f2581f433d94c50012b31 /src/check_expr.cpp | |
| parent | 30f5a3bb9358ded6a48e8d8ba6f5eb0b3743a807 (diff) | |
Fix #209 #assert 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 12aae53a1..8bf071dcb 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1012,8 +1012,10 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type * if (e->type == nullptr) { + if (e->state == EntityState_Unresolved) { + return nullptr; + } compiler_error("How did this happen? type: %s; identifier: %.*s\n", type_to_string(e->type), LIT(name)); - // return nullptr; } e->flags |= EntityFlag_Used; |