File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -472,11 +472,14 @@ Optional<Type> DefaultTypeRequest::getCachedResult() const {
472
472
}
473
473
474
474
bool DefaultTypeRequest::isDependencyMissing (Type result) const {
475
- if (const auto *NTD = result->getNominalOrBoundGenericNominal ())
476
- if (auto *SF = getSourceFile ())
477
- if (auto *tracker = SF->getReferencedNameTracker ())
478
- return tracker->getTopLevelNames ().find (NTD->getBaseName ()) ==
479
- tracker->getTopLevelNames ().end ();
475
+ if (auto *SF = getSourceFile ())
476
+ if (auto *tracker = SF->getReferencedNameTracker ()) {
477
+ Identifier name = getDeclContext ()->getASTContext ().getIdentifier (
478
+ getTypeName (getKnownProtocolKind ()));
479
+ DeclBaseName bn = DeclBaseName (name);
480
+ return tracker->getTopLevelNames ().find (bn) ==
481
+ tracker->getTopLevelNames ().end ();
482
+ }
480
483
return false ;
481
484
}
482
485
You can’t perform that action at this time.
0 commit comments