Skip to content

Commit 6f981e5

Browse files
committed
[ConstraintSystem] Forgo checking if key path is already found to be non-Sendable
1 parent 0ec84e7 commit 6f981e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7494,6 +7494,11 @@ ConstraintSystem::inferKeyPathLiteralCapability(KeyPathExpr *keyPath) {
74947494
auto *sendable = Context.getProtocol(KnownProtocolKind::Sendable);
74957495

74967496
for (const auto &arg : *args) {
7497+
// No need to check more or delay since we already known
7498+
// that the type is not Sendable.
7499+
if (!isSendable)
7500+
break;
7501+
74977502
auto argTy = simplifyType(getType(arg.getExpr()));
74987503

74997504
// Sendability cannot be determined until the argument

0 commit comments

Comments
 (0)