File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4776,9 +4776,14 @@ static bool checkClassGlobalActorIsolation(
4776
4776
switch (superIsolation) {
4777
4777
case ActorIsolation::Unspecified:
4778
4778
case ActorIsolation::Nonisolated:
4779
- case ActorIsolation::NonisolatedUnsafe:
4779
+ case ActorIsolation::NonisolatedUnsafe: {
4780
+ auto &ctx = classDecl->getASTContext ();
4781
+ if (ctx.LangOpts .hasFeature (Feature::GlobalActorIsolatedTypesUsability))
4782
+ return false ;
4783
+
4780
4784
downgradeToWarning = true ;
4781
4785
break ;
4786
+ }
4782
4787
4783
4788
case ActorIsolation::Erased:
4784
4789
llvm_unreachable (" class cannot have erased isolation" );
@@ -6004,6 +6009,13 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
6004
6009
inheritedConformance.getConcrete ());
6005
6010
}
6006
6011
}
6012
+
6013
+ // Classes that add global actor isolation to non-Sendable
6014
+ // superclasses cannot be 'Sendable'.
6015
+ if (ctx.LangOpts .hasFeature (Feature::GlobalActorIsolatedTypesUsability) &&
6016
+ nominal->getGlobalActorAttr ()) {
6017
+ return nullptr ;
6018
+ }
6007
6019
}
6008
6020
}
6009
6021
You can’t perform that action at this time.
0 commit comments