Skip to content

Commit 33e091c

Browse files
committed
[CSSimplify] Allow any Sendable -> Any if subscript appears in preconcurrency context
(cherry picked from commit b7a7839)
1 parent 2191f37 commit 33e091c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3722,6 +3722,10 @@ static bool matchSendableExistentialToAnyInGenericArgumentPosition(
37223722
return isPreconcurrencyContext(
37233723
cs.getConstraintLocator(UDE->getBase()));
37243724
}
3725+
if (auto *SE = getAsExpr<SubscriptExpr>(calleeLoc->getAnchor())) {
3726+
return isPreconcurrencyContext(
3727+
cs.getConstraintLocator(SE->getBase()));
3728+
}
37253729
return false;
37263730
}
37273731

0 commit comments

Comments
 (0)