From 49ea9ed7226b68cde2eeea3984d61098df9f22e3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 9 Jun 2018 10:08:17 +0100 Subject: Entity aliasing clean up --- src/check_type.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/check_type.cpp') 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); -- cgit v1.2.3