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 @@ -2652,7 +2652,8 @@ namespace {
2652
2652
func->diagnose (
2653
2653
diag::local_function_executed_concurrently,
2654
2654
func->getDescriptiveKind (), func->getName ())
2655
- .fixItInsert (func->getAttributeInsertionLoc (false ), " @Sendable " );
2655
+ .fixItInsert (func->getAttributeInsertionLoc (false ), " @Sendable " )
2656
+ .warnUntilSwiftVersion (6 );
2656
2657
2657
2658
// Add the @Sendable attribute implicitly, so we don't diagnose
2658
2659
// again.
Original file line number Diff line number Diff line change @@ -690,7 +690,7 @@ func checkLocalFunctions() async {
690
690
i = 17
691
691
}
692
692
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 }}
694
694
j = 42
695
695
}
696
696
@@ -721,7 +721,7 @@ func checkLocalFunctions() async {
721
721
}
722
722
}
723
723
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'}}
725
725
k = 25 // expected-error{{mutation of captured var 'k' in concurrently-executing code}}
726
726
}
727
727
You can’t perform that action at this time.
0 commit comments