diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-09 10:08:17 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-09 10:08:17 +0100 |
| commit | 49ea9ed7226b68cde2eeea3984d61098df9f22e3 (patch) | |
| tree | c6c101d298e02f3c0118ccd3dbe1bd1e8bc35953 /src/check_type.cpp | |
| parent | d7108416c9abca6bd9ebd45ad54c3b3af6829345 (diff) | |
Entity aliasing clean up
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 8eef0590d..7151c9b6f 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -12,7 +12,7 @@ void populate_using_entity_scope(CheckerContext *ctx, AstNode *node, Type *t) { Entity *f = t->Struct.fields[i]; GB_ASSERT(f->kind == Entity_Variable); String name = f->token.string;; - Entity *e = current_scope_lookup_entity(ctx->scope, name); + Entity *e = scope_lookup_current(ctx->scope, name); if (e != nullptr && name != "_") { // TODO(bill): Better type error if (str != nullptr) { @@ -589,7 +589,7 @@ void check_enum_type(CheckerContext *ctx, Type *enum_type, Type *named_type, Ast e->flags |= EntityFlag_Visited; e->state = EntityState_Resolved; - if (current_scope_lookup_entity(ctx->scope, name) != nullptr) { + if (scope_lookup_current(ctx->scope, name) != nullptr) { error(ident, "'%.*s' is already declared in this enumeration", LIT(name)); } else { add_entity(ctx->checker, ctx->scope, nullptr, e); @@ -674,7 +674,7 @@ void check_bit_field_type(CheckerContext *ctx, Type *bit_field_type, AstNode *no e->flags |= EntityFlag_BitFieldValue; if (!is_blank_ident(name) && - current_scope_lookup_entity(ctx->scope, name) != nullptr) { + scope_lookup_current(ctx->scope, name) != nullptr) { error(ident, "'%.*s' is already declared in this bit field", LIT(name)); } else { add_entity(ctx->checker, ctx->scope, nullptr, e); |