Compare the package names of the accessing module and the decl's defining module.

Update tests.
This commit is contained in:
Ellie Shin
2024-02-08 20:08:46 -08:00
parent f5150e7265
commit 7d4e5678c7
7 changed files with 52 additions and 43 deletions

View File

@@ -480,8 +480,8 @@ public:
return Identifier();
}
bool inPackage(std::string packageName) {
return !getPackageName().empty() && getPackageName().str() == packageName;
bool inSamePackage(ModuleDecl *other) {
return !getPackageName().empty() && getPackageName() == other->getPackageName();
}
/// Get the package associated with this module