diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-17 21:50:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-17 21:50:40 +0100 |
| commit | a99cc2fd70d31b3a0b5a6881d4b5cb431f911354 (patch) | |
| tree | d5afcb258f71bc16d2a79bb97d32f3594419c759 /src/check_expr.cpp | |
| parent | 5fe4c33d0e71250bcedde0bfada91aab75c640ab (diff) | |
Clean up import lookup code
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index ada8a177d..c0df9bdc9 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2590,22 +2590,10 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ return nullptr; } - check_entity_decl(c, entity, nullptr, nullptr); GB_ASSERT(entity->type != nullptr); - - bool implicit_is_found = is_entity_implicitly_imported(e, entity); - bool is_not_exported = !is_entity_exported(entity); - if (entity->kind == Entity_ImportName) { - is_not_exported = true; - } else if (implicit_is_found) { - is_not_exported = true; - } - - - - if (is_not_exported) { + if (!is_entity_exported(entity)) { gbString sel_str = expr_to_string(selector); error(op_expr, "'%s' is not exported by '%.*s'", sel_str, LIT(import_name)); gb_string_free(sel_str); |