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(
9043
9043
nominal->getDeclaredType ());
9044
9044
SwiftContext.evaluator .cacheOutput (ExtendedNominalRequest{ext},
9045
9045
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;
9046
9051
ext->setMemberLoader (this , reinterpret_cast <uintptr_t >(declSubmodule));
9047
9052
9048
9053
if (auto protoDecl = ext->getExtendedProtocolDecl ()) {
@@ -9052,8 +9057,6 @@ ClangImporter::Implementation::importDeclContextOf(
9052
9057
// Add the extension to the nominal type.
9053
9058
nominal->addExtension (ext);
9054
9059
9055
- // Record this extension so we can find it later.
9056
- extensionPoints[extensionKey] = ext;
9057
9060
return ext;
9058
9061
}
9059
9062
You can’t perform that action at this time.
0 commit comments