File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -10686,9 +10686,8 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
10686
10686
auto *sequenceProto = cast<ProtocolDecl>(
10687
10687
getContextualType(baseExpr, /*forConstraint=*/false)
10688
10688
->getAnyNominal());
10689
- bool isAsync = sequenceProto ==
10690
- TypeChecker::getProtocol(
10691
- ctx, SourceLoc(), KnownProtocolKind::AsyncSequence);
10689
+ bool isAsync = sequenceProto->getKnownProtocolKind() ==
10690
+ KnownProtocolKind::AsyncSequence;
10692
10691
10693
10692
auto *makeIterator = isAsync ? ctx.getAsyncSequenceMakeAsyncIterator()
10694
10693
: ctx.getSequenceMakeIterator();
@@ -10704,10 +10703,8 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
10704
10703
auto *iteratorProto = cast<ProtocolDecl>(
10705
10704
getContextualType(baseExpr, /*forConstraint=*/false)
10706
10705
->getAnyNominal());
10707
- bool isAsync =
10708
- iteratorProto ==
10709
- TypeChecker::getProtocol(ctx, SourceLoc(),
10710
- KnownProtocolKind::AsyncIteratorProtocol);
10706
+ bool isAsync = iteratorProto->getKnownProtocolKind() ==
10707
+ KnownProtocolKind::AsyncIteratorProtocol;
10711
10708
10712
10709
auto *next =
10713
10710
isAsync ? ctx.getAsyncIteratorNext() : ctx.getIteratorNext();
You can’t perform that action at this time.
0 commit comments