Skip to content

Commit f50c7c9

Browse files
committed
RequirementMachine: Tweak TypeAliasRequirementsRequest to match GSB on highly-invalid code
1 parent 5c11f36 commit f50c7c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/AST/RequirementMachine/RequirementLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ TypeAliasRequirementsRequest::evaluate(Evaluator &evaluator,
505505
for (auto *inheritedProto : ctx.getRewriteContext().getInheritedProtocols(proto)) {
506506
for (auto req : inheritedProto->getMembers()) {
507507
if (auto *typeReq = dyn_cast<TypeDecl>(req)) {
508-
// Ignore generic typealiases.
509-
if (auto typeAliasReq = dyn_cast<TypeAliasDecl>(typeReq))
510-
if (typeAliasReq->isGeneric())
508+
// Ignore generic types.
509+
if (auto genReq = dyn_cast<GenericTypeDecl>(req))
510+
if (genReq->getGenericParams())
511511
continue;
512512

513513
inheritedTypeDecls[typeReq->getName()].push_back(typeReq);

0 commit comments

Comments
 (0)