You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varmutableState:Int=17 // expected-note 3 {{mutation of this property is only permitted within the actor}}
814
+
varmutableState:Int=17 // expected-note 2 {{mutation of this property is only permitted within the actor}}
815
815
varotherMutableState:Int
816
816
letnonSendable:SomeClass
817
817
@@ -911,16 +911,16 @@ actor SomeActorWithInits {
911
911
912
912
let _ ={
913
913
defer{
914
-
isolated() // expected-error{{actor-isolated instance method 'isolated()' can not be referenced from a non-isolated context}}
915
-
mutableState +=1 // expected-error{{actor-isolated property 'mutableState' can not be mutated from a non-isolated context}}
914
+
isolated() // expected-warning{{actor-isolated instance method 'isolated()' can not be referenced from a non-isolated closure; this is an error in Swift 6}}
915
+
mutableState +=1 // expected-warning{{actor-isolated property 'mutableState' can not be referenced from a non-isolated closure; this is an error in Swift 6}}
916
916
nonisolated()
917
917
}
918
918
nonisolated()
919
919
}()
920
920
}
921
921
922
922
923
-
func isolated(){} // expected-note 8 {{calls to instance method 'isolated()' from outside of its actor context are implicitly asynchronous}}
923
+
func isolated(){} // expected-note 7 {{calls to instance method 'isolated()' from outside of its actor context are implicitly asynchronous}}
924
924
nonisolatedfunc nonisolated(){}
925
925
}
926
926
@@ -1344,3 +1344,15 @@ final class MainActorInit: Sendable {
1344
1344
1345
1345
func f(){}
1346
1346
}
1347
+
1348
+
actorDunkTracker{
1349
+
privatevarlebron:Int?
1350
+
privatevarcurry:Int?
1351
+
1352
+
deinit{
1353
+
// expected-warning@+1 {{actor-isolated property 'curry' can not be referenced from a non-isolated autoclosure; this is an error in Swift 6}}
0 commit comments