aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-27 13:09:37 +0100
committergingerBill <bill@gingerbill.org>2021-04-27 13:09:37 +0100
commite7e1866e5047a85648e758a2d94c8247c65a6608 (patch)
tree5b837f4cda820adf20f79a78bf86f3c7bd3070a5 /src/check_expr.cpp
parent94fd59e6f0e509f823edd3c90130841510cceb70 (diff)
Fix #893
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 6c4a78e53..91f0e5d84 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -1141,6 +1141,9 @@ Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *named_type, Typ
}
return nullptr;
}
+
+ GB_ASSERT((e->flags & EntityFlag_Overridden) == 0);
+
if (e->parent_proc_decl != nullptr &&
e->parent_proc_decl != c->curr_proc_decl) {
if (e->kind == Entity_Variable) {
@@ -1195,8 +1198,6 @@ Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *named_type, Typ
if (e->state == EntityState_Unresolved) {
check_entity_decl(c, e, nullptr, named_type);
}
-
-
if (e->type == nullptr) {
// TODO(bill): Which is correct? return or compiler_error?
// compiler_error("How did this happen? type: %s; identifier: %.*s\n", type_to_string(e->type), LIT(name));