diff options
| author | gingerBill <bill@gingerbill.org> | 2019-03-15 18:30:39 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-03-15 18:30:39 +0000 |
| commit | fdb60b2d511f99dd9b8b427d032333992b10fd6a (patch) | |
| tree | f4149a91081cd71c13dca54d8f1e305a90456b48 /src/check_stmt.cpp | |
| parent | 885c5dc8b75dd88d376627195a5468d12264bcc5 (diff) | |
Improve package strings
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index cead61ce8..07de5dc2e 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -474,10 +474,11 @@ bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us, Ast *expr, b case Entity_ImportName: { Scope *scope = e->ImportName.scope; for_array(i, scope->elements.entries) { + String name = scope->elements.entries[i].key.string; Entity *decl = scope->elements.entries[i].value; if (!is_entity_exported(decl)) continue; - Entity *found = scope_insert(ctx->scope, decl); + Entity *found = scope_insert_with_name(ctx->scope, name, decl); if (found != nullptr) { gbString expr_str = expr_to_string(expr); error(us->token, |