mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ScanDependencies] Make sure canImport resolution agrees with import
Fix the problem that when the only module can be found is an invalid/out-of-date swift binary module, canImport and import statement can have different view for if the module can be imported or not. Now canImport will evaluate to false if the only module can be found for name is an invalid swiftmodule, with a warning with the path to the module so users will not be surprised by such behavior. rdar://128876895
This commit is contained in:
@@ -287,7 +287,7 @@ public:
|
||||
///
|
||||
/// If a non-null \p versionInfo is provided, the module version will be
|
||||
/// parsed and populated.
|
||||
virtual bool canImportModule(ImportPath::Module named,
|
||||
virtual bool canImportModule(ImportPath::Module named, SourceLoc loc,
|
||||
ModuleVersionInfo *versionInfo,
|
||||
bool isTestableImport = false) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user