@@ -4516,27 +4516,27 @@ ProtocolConformance *GetImplicitSendableRequest::evaluate(
45164516 return conformance;
45174517 };
45184518
4519- // A non-protocol type with a global actor is implicitly Sendable.
4520- if (nominal->getGlobalActorAttr ()) {
4521- // If this is a class, check the superclass. If it's already Sendable,
4522- // form an inherited conformance.
4523- if (classDecl) {
4524- if (Type superclass = classDecl->getSuperclass ()) {
4525- auto classModule = classDecl->getParentModule ();
4526- if (auto inheritedConformance = TypeChecker::conformsToProtocol (
4527- classDecl->mapTypeIntoContext (superclass),
4528- proto, classModule, /* allowMissing=*/ false )) {
4529- inheritedConformance = inheritedConformance
4530- .mapConformanceOutOfContext ();
4531- if (inheritedConformance.isConcrete ()) {
4532- return ctx.getInheritedConformance (
4533- nominal->getDeclaredInterfaceType (),
4534- inheritedConformance.getConcrete ());
4535- }
4519+ // If this is a class, check the superclass. If it's already Sendable,
4520+ // form an inherited conformance.
4521+ if (classDecl) {
4522+ if (Type superclass = classDecl->getSuperclass ()) {
4523+ auto classModule = classDecl->getParentModule ();
4524+ if (auto inheritedConformance = TypeChecker::conformsToProtocol (
4525+ classDecl->mapTypeIntoContext (superclass),
4526+ proto, classModule, /* allowMissing=*/ false )) {
4527+ inheritedConformance = inheritedConformance
4528+ .mapConformanceOutOfContext ();
4529+ if (inheritedConformance.isConcrete ()) {
4530+ return ctx.getInheritedConformance (
4531+ nominal->getDeclaredInterfaceType (),
4532+ inheritedConformance.getConcrete ());
45364533 }
45374534 }
45384535 }
4536+ }
45394537
4538+ // A non-protocol type with a global actor is implicitly Sendable.
4539+ if (nominal->getGlobalActorAttr ()) {
45404540 // Form the implicit conformance to Sendable.
45414541 return formConformance (nullptr );
45424542 }
0 commit comments