Skip to content

Commit b7a7839

Browse files
committed
[CSSimplify] Allow any Sendable -> Any if subscript appears in preconcurrency context
1 parent c225db4 commit b7a7839

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
@@ -3746,6 +3746,10 @@ static bool matchSendableExistentialToAnyInGenericArgumentPosition(
37463746
return isPreconcurrencyContext(
37473747
cs.getConstraintLocator(UDE->getBase()));
37483748
}
3749+
if (auto *SE = getAsExpr<SubscriptExpr>(calleeLoc->getAnchor())) {
3750+
return isPreconcurrencyContext(
3751+
cs.getConstraintLocator(SE->getBase()));
3752+
}
37493753
return false;
37503754
}
37513755

0 commit comments

Comments
 (0)