File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9043,6 +9043,11 @@ ClangImporter::Implementation::importDeclContextOf(
90439043 nominal->getDeclaredType ());
90449044 SwiftContext.evaluator .cacheOutput (ExtendedNominalRequest{ext},
90459045 std::move (nominal));
9046+
9047+ // Record this extension so we can find it later. We do this early because
9048+ // once we've set the member loader, we don't know when the compiler will use
9049+ // it and end up back in this method.
9050+ extensionPoints[extensionKey] = ext;
90469051 ext->setMemberLoader (this , reinterpret_cast <uintptr_t >(declSubmodule));
90479052
90489053 if (auto protoDecl = ext->getExtendedProtocolDecl ()) {
@@ -9052,8 +9057,6 @@ ClangImporter::Implementation::importDeclContextOf(
90529057 // Add the extension to the nominal type.
90539058 nominal->addExtension (ext);
90549059
9055- // Record this extension so we can find it later.
9056- extensionPoints[extensionKey] = ext;
90579060 return ext;
90589061}
90599062
You can’t perform that action at this time.
0 commit comments