mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Skip sendability check for static members
Such members only capture base metatatypes which are themselves always sendable.
This commit is contained in:
@@ -2806,7 +2806,9 @@ ConstraintSystem::getTypeOfMemberReference(
|
||||
FunctionType::ExtInfo info;
|
||||
|
||||
if (Context.LangOpts.hasFeature(Feature::InferSendableFromCaptures)) {
|
||||
if (isPartialApplication(locator) && baseOpenedTy->isSendableType()) {
|
||||
if (isPartialApplication(locator) &&
|
||||
(resolvedBaseTy->is<AnyMetatypeType>() ||
|
||||
baseOpenedTy->isSendableType())) {
|
||||
// Add @Sendable to functions without conditional conformances
|
||||
functionType =
|
||||
functionType
|
||||
|
||||
Reference in New Issue
Block a user