mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ABI checker: check validity of extended nominals before continue
rdar://87150470
This commit is contained in:
@@ -1906,10 +1906,11 @@ void SwiftDeclCollector::lookupVisibleDecls(ArrayRef<ModuleDecl *> Modules) {
|
||||
for (auto *D: KnownDecls) {
|
||||
if (auto *Ext = dyn_cast<ExtensionDecl>(D)) {
|
||||
if (HandledExtensions.find(Ext) == HandledExtensions.end()) {
|
||||
auto *NTD = Ext->getExtendedNominal();
|
||||
// Check if the extension is from other modules.
|
||||
if (!llvm::is_contained(Modules, NTD->getModuleContext())) {
|
||||
ExtensionMap[NTD].push_back(Ext);
|
||||
if (auto *NTD = Ext->getExtendedNominal()) {
|
||||
// Check if the extension is from other modules.
|
||||
if (!llvm::is_contained(Modules, NTD->getModuleContext())) {
|
||||
ExtensionMap[NTD].push_back(Ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user