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
Copy file name to clipboardExpand all lines: test/Concurrency/concurrent_value_checking.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ protocol AsyncProto {
270
270
}
271
271
272
272
extensionA1:AsyncProto{
273
-
func asyncMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable parameter type 'NotConcurrent' cannot be sent from protocol requirement 'asyncMethod' into actor-isolated implementation}}
273
+
func asyncMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable parameter type 'NotConcurrent' cannot be sent from caller of protocol requirement 'asyncMethod' into actor-isolated implementation}}
274
274
}
275
275
276
276
protocolMainActorProto{
@@ -279,7 +279,7 @@ protocol MainActorProto {
279
279
280
280
classSomeClass:MainActorProto{
281
281
@SomeGlobalActor
282
-
func asyncMainMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable parameter type 'NotConcurrent' cannot be sent from protocol requirement 'asyncMainMethod' into global actor 'SomeGlobalActor'-isolated implementation}}
282
+
func asyncMainMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable parameter type 'NotConcurrent' cannot be sent from caller of protocol requirement 'asyncMainMethod' into global actor 'SomeGlobalActor'-isolated implementation}}
Copy file name to clipboardExpand all lines: test/Concurrency/sendable_checking.swift
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -142,12 +142,12 @@ protocol P {
142
142
func foo(x :()->())->(){}
143
143
144
144
func bar(x :()->())->(){}
145
-
// expected-warning@-1 {{non-sendable parameter type '() -> ()' cannot be sent from protocol requirement 'bar(x:)' into actor-isolated implementation}}
145
+
// expected-warning@-1 {{non-sendable parameter type '() -> ()' cannot be sent from caller of protocol requirement 'bar(x:)' into actor-isolated implementation}}
146
146
147
147
func foo2<T>(x :T)->(){}
148
148
149
149
func bar2<T>(x :T)->(){}
150
-
// expected-warning@-1 {{non-sendable parameter type 'T' cannot be sent from protocol requirement 'bar2(x:)' into actor-isolated implementation}}
150
+
// expected-warning@-1 {{non-sendable parameter type 'T' cannot be sent from caller of protocol requirement 'bar2(x:)' into actor-isolated implementation}}
151
151
}
152
152
153
153
@available(SwiftStdlib 5.1,*)
@@ -174,12 +174,12 @@ class Sub : Super {
174
174
overridenonisolatedfunc foo(x :()->())async{}
175
175
176
176
overridenonisolatedfunc bar(x :()->())async{}
177
-
// expected-warning@-1 {{non-sendable parameter type '() -> ()' cannot be sent from superclass instance method 'bar(x:)' into nonisolated override}}
177
+
// expected-warning@-1 {{non-sendable parameter type '() -> ()' cannot be sent from caller of superclass instance method 'bar(x:)' into nonisolated override}}
178
178
179
179
overridenonisolatedfunc foo2<T>(x:T)async{}
180
180
181
181
overridenonisolatedfunc bar2<T>(x:T)async{}
182
-
// expected-warning@-1 {{non-sendable parameter type 'T' cannot be sent from superclass instance method 'bar2(x:)' into nonisolated override}}
182
+
// expected-warning@-1 {{non-sendable parameter type 'T' cannot be sent from caller of superclass instance method 'bar2(x:)' into nonisolated override}}
183
183
}
184
184
185
185
@available(SwiftStdlib 5.1,*)
@@ -216,8 +216,8 @@ class SuperWUnsafeSubscript {
216
216
classSubWUnsafeSubscript:SuperWUnsafeSubscript{
217
217
overridenonisolated subscript<T>(x :T)->Int{
218
218
get async{
219
-
// expected-warning@-2{{non-sendable parameter type 'T' cannot be sent from superclass subscript 'subscript(_:)' into nonisolated override}}
220
-
// expected-warning@-2{{non-sendable parameter type 'T' cannot be sent from superclass getter for subscript 'subscript(_:)' into nonisolated override}}
219
+
// expected-warning@-2{{non-sendable parameter type 'T' cannot be sent from caller of superclass subscript 'subscript(_:)' into nonisolated override}}
220
+
// expected-warning@-2{{non-sendable parameter type 'T' cannot be sent from caller of superclass getter for subscript 'subscript(_:)' into nonisolated override}}
221
221
// there really shouldn't be two warnings produced here, see rdar://110846040 (Sendable diagnostics reported twice for subscript getters)
Copy file name to clipboardExpand all lines: test/Concurrency/sendable_override_checking.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,10 @@ class Super {
24
24
@available(SwiftStdlib 5.1,*)
25
25
classSub:Super{
26
26
@MainActoroverridefunc f(_:NotSendable)async{}
27
-
// expected-warning@-1{{non-sendable parameter type 'NotSendable' cannot be sent from superclass instance method 'f' into main actor-isolated override}}
27
+
// expected-warning@-1{{non-sendable parameter type 'NotSendable' cannot be sent from caller of superclass instance method 'f' into main actor-isolated override}}
// expected-warning@-1{{non-sendable parameter type 'NotSendable' cannot be sent from superclass instance method 'g2' into nonisolated override}}
32
+
// expected-warning@-1{{non-sendable parameter type 'NotSendable' cannot be sent from caller of superclass instance method 'g2' into nonisolated override}}
0 commit comments