AST: Fix a typo in missingImportsForDefiningModule().

This commit is contained in:
Allan Shortlidge
2025-04-24 21:11:17 -07:00
parent f3ef07083b
commit 039974ad17
2 changed files with 3 additions and 3 deletions

View File

@@ -835,7 +835,7 @@ missingImportsForDefiningModule(ModuleDecl *owningModule, SourceFile &sf) {
}
std::sort(result.begin(), result.end(), [](ModuleDecl *LHS, ModuleDecl *RHS) {
return LHS->getNameStr() < LHS->getNameStr();
return LHS->getNameStr() < RHS->getNameStr();
});
return result;

View File

@@ -39,8 +39,8 @@ import Swift
// expected-note@-1 2 {{add import of module 'DeclaringLibrary'}}
private func test() {
returnsDeclaringTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'DeclaringLibrary' and 'BystandingLibrary'}}
returnsBystandingTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'DeclaringLibrary' and 'BystandingLibrary'}}
returnsDeclaringTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'BystandingLibrary' and 'DeclaringLibrary'}}
returnsBystandingTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'BystandingLibrary' and 'DeclaringLibrary'}}
}
//--- BothDeclaringAndBystanding.swift