mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Report cannot load submodule if only able to load top module
For loaders that don't support loading submodules, canImportModule should report false instead of checking if can import top module.
This commit is contained in:
@@ -1849,6 +1849,8 @@ bool ExplicitSwiftModuleLoader::canImportModule(ImportPath::Module path,
|
||||
llvm::VersionTuple version,
|
||||
bool underlyingVersion) {
|
||||
// FIXME: Swift submodules?
|
||||
if (path.hasSubmodule())
|
||||
return false;
|
||||
ImportPath::Element mID = path.front();
|
||||
// Look up the module with the real name (physical name on disk);
|
||||
// in case `-module-alias` is used, the name appearing in source files
|
||||
|
||||
Reference in New Issue
Block a user