Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugobros3 committed Jul 5, 2024
1 parent dd8d6f1 commit 7fba65d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,13 @@ void UseDecl::bind_wildcard(artic::NameBinder& binder) {
binder.bind(path);
assert(path.elems.size() >= 2);
auto& penultimate = path.elems[path.elems.size() - 2];
NamedDecl* decl = penultimate.decl;
auto mod = decl->isa<ModDecl>();
if (!mod) {
binder.error(penultimate.id.loc, "'{}' is not a module", decl->id.name);
NamedDecl* importee = penultimate.decl;
auto imported_mod = importee->isa<ModDecl>();
if (!imported_mod) {
binder.error(penultimate.id.loc, "'{}' is not a module", importee->id.name);
}

for (auto& decl : mod->decls) {
for (auto& decl : imported_mod->decls) {
auto member = decl->isa<NamedDecl>();
if (!member)
continue;
Expand Down

0 comments on commit 7fba65d

Please sign in to comment.