mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Allow ConformanceLookupTable::forEachInStage() to find ExtensionDecls in the Builtin module
This commit is contained in:
@@ -202,7 +202,8 @@ void ConformanceLookupTable::forEachInStage(ConformanceStage stage,
|
||||
for (auto conf : conformances) {
|
||||
protocols.push_back({conf->getProtocol(), SourceLoc(), SourceLoc()});
|
||||
}
|
||||
} else if (next->getParentSourceFile()) {
|
||||
} else if (next->getParentSourceFile() ||
|
||||
next->getParentModule()->isBuiltinModule()) {
|
||||
bool anyObject = false;
|
||||
for (const auto &found :
|
||||
getDirectlyInheritedNominalTypeDecls(next, anyObject)) {
|
||||
@@ -418,8 +419,10 @@ void ConformanceLookupTable::loadAllConformances(
|
||||
ArrayRef<ProtocolConformance*> conformances) {
|
||||
// If this declaration context came from source, there's nothing to
|
||||
// do here.
|
||||
if (dc->getParentSourceFile())
|
||||
if (dc->getParentSourceFile() ||
|
||||
dc->getParentModule()->isBuiltinModule()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add entries for each loaded conformance.
|
||||
for (auto conformance : conformances) {
|
||||
|
||||
Reference in New Issue
Block a user