Skip to content

Commit 5a91cea

Browse files
committed
[Namelookup] Wallk into GenericIdentTypeRepr
1 parent c837baa commit 5a91cea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/AST/NameLookup.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,6 @@ bool TypeRepr::isProtocol(DeclContext *dc){
27982798
auto &ctx = dc->getASTContext();
27992799
return findIf([&ctx, dc](TypeRepr *ty) {
28002800
return declsAreProtocols(directReferencesForTypeRepr(ctx.evaluator, ctx, ty, dc));
2801-
28022801
});
28032802
}
28042803

@@ -2852,6 +2851,8 @@ CollectedOpaqueReprs swift::collectOpaqueReturnTypeReprs(TypeRepr *r, ASTContext
28522851
if (!compositionRepr->isTypeReprAny())
28532852
Reprs.push_back(compositionRepr);
28542853
return Action::SkipChildren();
2854+
} else if (auto generic = dyn_cast<GenericIdentTypeRepr>(repr)) {
2855+
return Action::Continue();
28552856
} else if (auto declRefTR = dyn_cast<DeclRefTypeRepr>(repr)) {
28562857
if (declRefTR->isProtocol(dc))
28572858
Reprs.push_back(declRefTR);

0 commit comments

Comments
 (0)