Skip to content

Commit 8280b20

Browse files
committed
Sema: Trigger lazy loading when recording potential selector conflicts
1 parent 6ba379f commit 8280b20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/TypeCheckDeclObjC.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,9 @@ void markAsObjC(ValueDecl *D, ObjCReason reason,
16191619

16201620
// Record the method in the class, if it's a member of one.
16211621
if (auto classDecl = D->getDeclContext()->getSelfClassDecl()) {
1622+
// Trigger lazy loading of any imported members with the same selector.
1623+
(void) classDecl->lookupDirect(selector, !method->isStatic());
1624+
16221625
classDecl->recordObjCMethod(method, selector);
16231626
}
16241627

0 commit comments

Comments
 (0)