mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #77285 from xymus/recover-under-loadObjCMethods
Serialization: Recover from errors under `loadObjCMethods`
This commit is contained in:
@@ -713,8 +713,15 @@ void ModuleFile::loadObjCMethods(
|
||||
continue;
|
||||
|
||||
// Deserialize the method and add it to the list.
|
||||
// Drop methods with errors.
|
||||
auto funcOrError = getDeclChecked(std::get<2>(result));
|
||||
if (!funcOrError) {
|
||||
diagnoseAndConsumeError(funcOrError.takeError());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (auto func = dyn_cast_or_null<AbstractFunctionDecl>(
|
||||
getDecl(std::get<2>(result)))) {
|
||||
funcOrError.get())) {
|
||||
methods.push_back(func);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user