@@ -325,8 +325,8 @@ extension MyActor {
325325 acceptInout ( & self . mutable) // expected-error{{actor-isolated property 'mutable' can not be used 'inout' from a Sendable closure}}
326326 _ = self . immutable
327327 _ = self . synchronous ( ) // expected-error{{call to actor-isolated instance method 'synchronous()' in a synchronous nonisolated context}}
328- _ = localVar // expected-error {{reference to captured var 'localVar' in concurrently-executing code}}
329- localVar = 25 // expected-error {{mutation of captured var 'localVar' in concurrently-executing code}}
328+ _ = localVar // expected-warning {{reference to captured var 'localVar' in concurrently-executing code}}
329+ localVar = 25 // expected-warning {{mutation of captured var 'localVar' in concurrently-executing code}}
330330 _ = localConstant
331331
332332 _ = otherLocalVar
@@ -357,17 +357,17 @@ extension MyActor {
357357 @Sendable func localFn1( ) {
358358 _ = self . text [ 0 ] // expected-error{{actor-isolated property 'text' can not be referenced from a Sendable function}}
359359 _ = self . synchronous ( ) // expected-error{{call to actor-isolated instance method 'synchronous()' in a synchronous nonisolated context}}
360- _ = localVar // expected-error {{reference to captured var 'localVar' in concurrently-executing code}}
361- localVar = 25 // expected-error {{mutation of captured var 'localVar' in concurrently-executing code}}
360+ _ = localVar // expected-warning {{reference to captured var 'localVar' in concurrently-executing code}}
361+ localVar = 25 // expected-warning {{mutation of captured var 'localVar' in concurrently-executing code}}
362362 _ = localConstant
363363 }
364364
365365 @Sendable func localFn2( ) {
366366 acceptClosure {
367367 _ = text [ 0 ] // expected-error{{actor-isolated property 'text' can not be referenced from a non-isolated context}}
368368 _ = self . synchronous ( ) // expected-error{{call to actor-isolated instance method 'synchronous()' in a synchronous nonisolated context}}
369- _ = localVar // expected-error {{reference to captured var 'localVar' in concurrently-executing code}}
370- localVar = 25 // expected-error {{mutation of captured var 'localVar' in concurrently-executing code}}
369+ _ = localVar // expected-warning {{reference to captured var 'localVar' in concurrently-executing code}}
370+ localVar = 25 // expected-warning {{mutation of captured var 'localVar' in concurrently-executing code}}
371371 _ = localConstant
372372 }
373373 }
@@ -640,8 +640,8 @@ func testGlobalRestrictions(actor: MyActor) async {
640640 // code.
641641 var i = 17
642642 acceptConcurrentClosure {
643- _ = i // expected-error {{reference to captured var 'i' in concurrently-executing code}}
644- i = 42 // expected-error {{mutation of captured var 'i' in concurrently-executing code}}
643+ _ = i // expected-warning {{reference to captured var 'i' in concurrently-executing code}}
644+ i = 42 // expected-warning {{mutation of captured var 'i' in concurrently-executing code}}
645645 }
646646 print ( i)
647647
@@ -738,7 +738,7 @@ func checkLocalFunctions() async {
738738 }
739739
740740 func local3( ) { // expected-warning{{concurrently-executed local function 'local3()' must be marked as '@Sendable'}}
741- k = 25 // expected-error {{mutation of captured var 'k' in concurrently-executing code}}
741+ k = 25 // expected-warning {{mutation of captured var 'k' in concurrently-executing code}}
742742 }
743743
744744 print ( k)
@@ -1158,12 +1158,12 @@ extension MyActor {
11581158 _ = synchronous ( ) // expected-error{{expression is 'async' but is not marked with 'await'}}
11591159 // expected-note@-1{{calls to instance method 'synchronous()' from outside of its actor context are implicitly asynchronous}}
11601160
1161- counter += 1 // expected-error {{mutation of captured var 'counter' in concurrently-executing code}}
1161+ counter += 1 // expected-warning {{mutation of captured var 'counter' in concurrently-executing code}}
11621162 }
11631163
11641164 acceptAsyncSendableClosure {
11651165 _ = await synchronous ( ) // ok
1166- counter += 1 // expected-error {{mutation of captured var 'counter' in concurrently-executing code}}
1166+ counter += 1 // expected-warning {{mutation of captured var 'counter' in concurrently-executing code}}
11671167 }
11681168
11691169 acceptAsyncSendableClosureInheriting {
@@ -1184,7 +1184,7 @@ func testGlobalActorInheritance() {
11841184 var counter = 0
11851185
11861186 acceptAsyncSendableClosure {
1187- counter += 1 // expected-error {{mutation of captured var 'counter' in concurrently-executing code}}
1187+ counter += 1 // expected-warning {{mutation of captured var 'counter' in concurrently-executing code}}
11881188 }
11891189
11901190 acceptAsyncSendableClosure { @SomeGlobalActor in
0 commit comments