Skip to content

Commit f91aac1

Browse files
authored
Merge pull request #15478 from slavapestov/another-sema-nit
Sema: Use NL_OnlyTypes flag in one spot
2 parents 8375ce9 + 560f6cc commit f91aac1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,13 +1042,12 @@ resolveGenericSignatureComponent(TypeChecker &TC, DeclContext *DC,
10421042
SmallVector<ValueDecl *, 4> decls;
10431043
if (DC->lookupQualified(nominal->getDeclaredInterfaceType(),
10441044
comp->getIdentifier(),
1045-
NL_QualifiedDefault|NL_ProtocolMembers,
1045+
NL_OnlyTypes|NL_QualifiedDefault|NL_ProtocolMembers,
10461046
&TC,
10471047
decls)) {
10481048
for (const auto decl : decls) {
10491049
// FIXME: Better ambiguity handling.
1050-
auto typeDecl = dyn_cast<TypeDecl>(decl);
1051-
if (!typeDecl) continue;
1050+
auto typeDecl = cast<TypeDecl>(decl);
10521051

10531052
if (!isa<ProtocolDecl>(typeDecl->getDeclContext())) continue;
10541053

0 commit comments

Comments
 (0)