We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1d91e7d + 95d6ddf commit 97ef673Copy full SHA for 97ef673
lib/AST/ASTContext.cpp
@@ -1255,6 +1255,14 @@ ASTContext::synthesizeInvertibleProtocolDecl(InvertibleProtocolKind ip) const {
1255
return proto;
1256
1257
ModuleDecl *stdlib = getStdlibModule();
1258
+ if (stdlib && stdlib->failedToLoad()) {
1259
+ stdlib = nullptr; // Use the Builtin module instead.
1260
+
1261
+ // Ensure we emitted an error diagnostic!
1262
+ if (!Diags.hadAnyError())
1263
+ Diags.diagnose(SourceLoc(), diag::serialization_load_failed, "Swift");
1264
+ }
1265
1266
FileUnit *file = nullptr;
1267
if (stdlib) {
1268
file = &stdlib->getFiles()[0]->getOrCreateSynthesizedFile();
0 commit comments