Skip to content

Commit 3b3e5a2

Browse files
committed
Avoid walking the nested type reprs for types reprs marked with 'some' keyword
1 parent 9458072 commit 3b3e5a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/AST/NameLookup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,6 +2826,7 @@ CollectedOpaqueReprs swift::collectTypeReprs(TypeRepr *r) {
28262826
bool walkToTypeReprPre(TypeRepr *repr) override {
28272827
if (auto opaqueRepr = dyn_cast<OpaqueReturnTypeRepr>(repr)){
28282828
Reprs.push_back(opaqueRepr);
2829+
return false;
28292830
} else if (auto compositionRepr = dyn_cast<CompositionTypeRepr>(repr)){
28302831
Reprs.push_back(compositionRepr);
28312832
} else if (auto identRepr = dyn_cast<IdentTypeRepr>(repr)){

0 commit comments

Comments
 (0)