Skip to content

Commit 4f61908

Browse files
committed
AST: Fix a typo in missingImportsForDefiningModule().
1 parent b4376a9 commit 4f61908

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Sema/TypeCheckNameLookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ missingImportsForDefiningModule(ModuleDecl *owningModule, SourceFile &sf) {
835835
}
836836

837837
std::sort(result.begin(), result.end(), [](ModuleDecl *LHS, ModuleDecl *RHS) {
838-
return LHS->getNameStr() < LHS->getNameStr();
838+
return LHS->getNameStr() < RHS->getNameStr();
839839
});
840840

841841
return result;

test/CrossImport/member-import-visibility.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import Swift
3939
// expected-note@-1 2 {{add import of module 'DeclaringLibrary'}}
4040

4141
private func test() {
42-
returnsDeclaringTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'DeclaringLibrary' and 'BystandingLibrary'}}
43-
returnsBystandingTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'DeclaringLibrary' and 'BystandingLibrary'}}
42+
returnsDeclaringTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'BystandingLibrary' and 'DeclaringLibrary'}}
43+
returnsBystandingTy().overlayMember() // expected-error {{instance method 'overlayMember()' is not available due to missing imports of defining modules 'BystandingLibrary' and 'DeclaringLibrary'}}
4444
}
4545

4646
//--- BothDeclaringAndBystanding.swift

0 commit comments

Comments
 (0)