@@ -4550,27 +4550,27 @@ ProtocolConformance *GetImplicitSendableRequest::evaluate(
45504550 return conformance;
45514551 };
45524552
4553- // A non-protocol type with a global actor is implicitly Sendable.
4554- if (nominal->getGlobalActorAttr ()) {
4555- // If this is a class, check the superclass. If it's already Sendable,
4556- // form an inherited conformance.
4557- if (classDecl) {
4558- if (Type superclass = classDecl->getSuperclass ()) {
4559- auto classModule = classDecl->getParentModule ();
4560- if (auto inheritedConformance = TypeChecker::conformsToProtocol (
4561- classDecl->mapTypeIntoContext (superclass),
4562- proto, classModule, /* allowMissing=*/ false )) {
4563- inheritedConformance = inheritedConformance
4564- .mapConformanceOutOfContext ();
4565- if (inheritedConformance.isConcrete ()) {
4566- return ctx.getInheritedConformance (
4567- nominal->getDeclaredInterfaceType (),
4568- inheritedConformance.getConcrete ());
4569- }
4553+ // If this is a class, check the superclass. If it's already Sendable,
4554+ // form an inherited conformance.
4555+ if (classDecl) {
4556+ if (Type superclass = classDecl->getSuperclass ()) {
4557+ auto classModule = classDecl->getParentModule ();
4558+ if (auto inheritedConformance = TypeChecker::conformsToProtocol (
4559+ classDecl->mapTypeIntoContext (superclass),
4560+ proto, classModule, /* allowMissing=*/ false )) {
4561+ inheritedConformance = inheritedConformance
4562+ .mapConformanceOutOfContext ();
4563+ if (inheritedConformance.isConcrete ()) {
4564+ return ctx.getInheritedConformance (
4565+ nominal->getDeclaredInterfaceType (),
4566+ inheritedConformance.getConcrete ());
45704567 }
45714568 }
45724569 }
4570+ }
45734571
4572+ // A non-protocol type with a global actor is implicitly Sendable.
4573+ if (nominal->getGlobalActorAttr ()) {
45744574 // Form the implicit conformance to Sendable.
45754575 return formConformance (nullptr );
45764576 }
0 commit comments