@@ -4853,14 +4853,12 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
48534853 bool isUnsafe = attr->isArgUnsafe ();
48544854 if (attr->hasArgs ()) {
48554855 if (isUnsafe) {
4856- bool inSwiftinterface = decl->getDeclContext ()->isInSwiftinterface ();
4857- ctx.Diags .diagnose (
4858- attr->getLocation (),
4859- diag::unsafe_global_actor)
4860- .fixItRemove (attr->getArgs ()->getSourceRange ())
4861- .fixItInsert (attr->getLocation (), " @preconcurrency " )
4862- .warnUntilSwiftVersion (6 )
4863- .limitBehaviorIf (inSwiftinterface, DiagnosticBehavior::Ignore);
4856+ if (!decl->getDeclContext ()->isInSwiftinterface ()) {
4857+ ctx.Diags .diagnose (attr->getLocation (), diag::unsafe_global_actor)
4858+ .fixItRemove (attr->getArgs ()->getSourceRange ())
4859+ .fixItInsert (attr->getLocation (), " @preconcurrency " )
4860+ .warnUntilSwiftVersion (6 );
4861+ }
48644862 } else {
48654863 ctx.Diags .diagnose (
48664864 attr->getLocation (),
@@ -6490,11 +6488,14 @@ static bool checkSendableInstanceStorage(
64906488 return true ;
64916489 }
64926490
6493- property->diagnose (diag::non_concurrent_type_member,
6494- propertyType, false , property->getName (),
6495- nominal)
6496- .limitBehaviorUntilSwiftVersion (behavior, 6 )
6497- .limitBehaviorIf (preconcurrency);
6491+ if (preconcurrency)
6492+ behavior = preconcurrency.value ();
6493+
6494+ property
6495+ ->diagnose (diag::non_concurrent_type_member, propertyType,
6496+ false , property->getName (), nominal)
6497+ .limitBehaviorWithPreconcurrency (behavior,
6498+ preconcurrency.has_value ());
64986499 return false ;
64996500 });
65006501
@@ -6532,10 +6533,14 @@ static bool checkSendableInstanceStorage(
65326533 return true ;
65336534 }
65346535
6535- element->diagnose (diag::non_concurrent_type_member, type,
6536- true , element->getName (), nominal)
6537- .limitBehaviorUntilSwiftVersion (behavior, 6 )
6538- .limitBehaviorIf (preconcurrency);
6536+ if (preconcurrency)
6537+ behavior = preconcurrency.value ();
6538+
6539+ element
6540+ ->diagnose (diag::non_concurrent_type_member, type, true ,
6541+ element->getName (), nominal)
6542+ .limitBehaviorWithPreconcurrency (behavior,
6543+ preconcurrency.has_value ());
65396544 return false ;
65406545 });
65416546
0 commit comments