Skip to content

Commit

Permalink
Import fixes (#542)
Browse files Browse the repository at this point in the history
* Fix sub-imports

* Fix sub-imports

* Remove log lines

* Fix out-of-module shadowing

---------

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
  • Loading branch information
arshajii and inumanag committed Feb 17, 2024
1 parent c16dfb5 commit 7a787bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codon/parser/visitors/simplify/function.cpp
Expand Up @@ -156,7 +156,7 @@ void SimplifyVisitor::visit(FunctionStmt *stmt) {
// Function bindings cannot be dominated either
if (!isClassMember) {
auto funcVal = ctx->find(stmt->name);
if (funcVal && funcVal->noShadow)
if (funcVal && funcVal->moduleName == ctx->getModule() && funcVal->noShadow)
E(Error::CLASS_INVALID_BIND, stmt, stmt->name);
funcVal = ctx->addFunc(stmt->name, rootName, stmt->getSrcInfo());
ctx->addAlwaysVisible(funcVal);
Expand Down

0 comments on commit 7a787bf

Please sign in to comment.