Skip to content

Commit

Permalink
Merge branch 'import-fixes' of https://github.com/exaloop/codon into …
Browse files Browse the repository at this point in the history
…import-fixes
  • Loading branch information
arshajii committed Feb 16, 2024
2 parents d2ed15e + b853397 commit 6214bf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codon/parser/visitors/simplify/function.cpp
Original file line number Diff line number Diff line change
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 6214bf8

Please sign in to comment.