File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2602,7 +2602,8 @@ namespace {
26022602 func->diagnose (
26032603 diag::local_function_executed_concurrently,
26042604 func->getDescriptiveKind (), func->getName ())
2605- .fixItInsert (func->getAttributeInsertionLoc (false ), " @Sendable " );
2605+ .fixItInsert (func->getAttributeInsertionLoc (false ), " @Sendable " )
2606+ .warnUntilSwiftVersion (6 );
26062607
26072608 // Add the @Sendable attribute implicitly, so we don't diagnose
26082609 // again.
Original file line number Diff line number Diff line change @@ -690,7 +690,7 @@ func checkLocalFunctions() async {
690690 i = 17
691691 }
692692
693- func local2( ) { // expected-error {{concurrently-executed local function 'local2()' must be marked as '@Sendable'}}{{3-3=@Sendable }}
693+ func local2( ) { // expected-warning {{concurrently-executed local function 'local2()' must be marked as '@Sendable'}}{{3-3=@Sendable }}
694694 j = 42
695695 }
696696
@@ -721,7 +721,7 @@ func checkLocalFunctions() async {
721721 }
722722 }
723723
724- func local3( ) { // expected-error {{concurrently-executed local function 'local3()' must be marked as '@Sendable'}}
724+ func local3( ) { // expected-warning {{concurrently-executed local function 'local3()' must be marked as '@Sendable'}}
725725 k = 25 // expected-error{{mutation of captured var 'k' in concurrently-executing code}}
726726 }
727727
You can’t perform that action at this time.
0 commit comments