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
_ =A2(value: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
69
+
_ =A2(value: value)
71
70
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
72
71
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(value:)' risks causing data races between actor-isolated and task-isolated uses}}
73
72
74
-
_ =awaitA2(valueAsync: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
73
+
_ =awaitA2(valueAsync: value)
75
74
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
76
75
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(valueAsync:)' risks causing data races between actor-isolated and task-isolated uses}}
77
76
78
-
_ =A2(delegatingSync: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
77
+
_ =A2(delegatingSync: value)
79
78
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
80
79
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(delegatingSync:)' risks causing data races between actor-isolated and task-isolated uses}}
81
80
82
-
_ =awaitA2(delegatingAsync: value,9) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
81
+
_ =awaitA2(delegatingAsync: value,9)
83
82
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
84
83
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(delegatingAsync:_:)' risks causing data races between actor-isolated and task-isolated uses}}
85
84
86
-
_ =awaitA2(nonisoAsync: value,3) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
85
+
_ =awaitA2(nonisoAsync: value,3)
87
86
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
88
87
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(nonisoAsync:_:)' risks causing data races between actor-isolated and task-isolated uses}}
89
88
}
@@ -104,7 +103,7 @@ extension A1 {
104
103
// expected-warning@-1 {{expression is 'async' but is not marked with 'await'}}
105
104
// expected-note@-2 {{property access is 'async'}}
106
105
_ =await other.synchronous() // expected-warning{{non-sendable type 'NotConcurrent?' returned by call to actor-isolated function cannot cross actor boundary}}
107
-
_ =await other.asynchronous(nil) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into actor-isolated context may introduce data races}}
106
+
_ =await other.asynchronous(nil)
108
107
}
109
108
}
110
109
@@ -142,8 +141,8 @@ func globalTest() async {
142
141
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
143
142
// expected-note@+1 {{property access is 'async'}}
144
143
leta= globalValue // expected-warning{{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated let 'globalValue' cannot cross actor boundary}}
145
-
awaitglobalAsync(a) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
146
-
awaitglobalSync(a) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
144
+
awaitglobalAsync(a)
145
+
awaitglobalSync(a)
147
146
148
147
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
149
148
// expected-note@+1 {{property access is 'async'}}
@@ -154,7 +153,7 @@ func globalTest() async {
154
153
// expected-typechecker-note@+2 {{call is 'async'}}
155
154
// expected-typechecker-note@+1 {{property access is 'async'}}
156
155
globalAsync(E.notSafe)
157
-
// expected-complete-warning@-1 {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
156
+
158
157
// expected-typechecker-warning@-2 {{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated static property 'notSafe' cannot cross actor boundary}}
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
179
178
// expected-note@+1 {{property access is 'async'}}
180
179
leta= globalValue // expected-warning {{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated let 'globalValue' cannot cross actor boundary}}
181
-
awaitglobalAsync(a) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
182
-
awaitglobalSync(a) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
183
-
_ =awaitClassWithGlobalActorInits(nc) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
180
+
awaitglobalAsync(a)
181
+
awaitglobalSync(a)
182
+
_ =awaitClassWithGlobalActorInits(nc)
184
183
// expected-warning @-1 {{non-sendable type 'ClassWithGlobalActorInits' returned by call to global actor 'SomeGlobalActor'-isolated function cannot cross actor boundary}}
185
184
// expected-tns-warning @-2 {{sending 'nc' risks causing data races}}
186
185
// expected-tns-note @-3 {{sending main actor-isolated 'nc' to global actor 'SomeGlobalActor'-isolated initializer 'init(_:)' risks causing data races between global actor 'SomeGlobalActor'-isolated and main actor-isolated uses}}
0 commit comments