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
@@ -223,7 +223,7 @@ protocol AsyncProto {
223
223
}
224
224
225
225
extensionA1:AsyncProto{
226
-
func asyncMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable type 'NotConcurrent' in parameter of actor-isolated instance method 'asyncMethod' satisfying non-isolated protocol requirement cannot cross actor boundary}}
226
+
func asyncMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable type 'NotConcurrent' in parameter of actor-isolated instance method 'asyncMethod' satisfying protocol requirement cannot cross actor boundary}}
227
227
}
228
228
229
229
protocolMainActorProto{
@@ -232,7 +232,7 @@ protocol MainActorProto {
232
232
233
233
classSomeClass:MainActorProto{
234
234
@SomeGlobalActor
235
-
func asyncMainMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable type 'NotConcurrent' in parameter of global actor 'SomeGlobalActor'-isolated instance method 'asyncMainMethod' satisfying non-isolated protocol requirement cannot cross actor boundary}}
235
+
func asyncMainMethod(_:NotConcurrent)async{} // expected-warning{{non-sendable type 'NotConcurrent' in parameter of global actor 'SomeGlobalActor'-isolated instance method 'asyncMainMethod' satisfying protocol requirement cannot cross actor boundary}}
func f()async->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying non-isolated protocol requirement cannot cross actor boundary}}
43
+
func f()async->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying protocol requirement cannot cross actor boundary}}
44
44
45
-
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to non-isolated protocol requirement cannot cross actor boundary}}
45
+
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to protocol requirement cannot cross actor boundary}}
46
46
get async{
47
47
NotSendable()
48
48
}
@@ -53,9 +53,9 @@ actor A3: AsyncProtocolWithNotSendable {
53
53
// actor's domain.
54
54
@available(SwiftStdlib 5.1,*)
55
55
actorA4:AsyncProtocolWithNotSendable{
56
-
func f()->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying non-isolated protocol requirement cannot cross actor boundary}}
56
+
func f()->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying protocol requirement cannot cross actor boundary}}
57
57
58
-
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to non-isolated protocol requirement cannot cross actor boundary}}
58
+
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to protocol requirement cannot cross actor boundary}}
func f()async->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying non-isolated protocol requirement cannot cross actor boundary}}
101
+
func f()async->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying protocol requirement cannot cross actor boundary}}
102
102
103
-
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to non-isolated protocol requirement cannot cross actor boundary}}
103
+
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to protocol requirement cannot cross actor boundary}}
104
104
get async{
105
105
NotSendable()
106
106
}
@@ -111,9 +111,9 @@ actor A7: AsyncThrowingProtocolWithNotSendable {
111
111
// actor's domain.
112
112
@available(SwiftStdlib 5.1,*)
113
113
actorA8:AsyncThrowingProtocolWithNotSendable{
114
-
func f()->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying non-isolated protocol requirement cannot cross actor boundary}}
114
+
func f()->NotSendable{NotSendable()} // expected-warning{{non-sendable type 'NotSendable' returned by actor-isolated instance method 'f()' satisfying protocol requirement cannot cross actor boundary}}
115
115
116
-
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to non-isolated protocol requirement cannot cross actor boundary}}
116
+
varprop:NotSendable{ // expected-warning{{non-sendable type 'NotSendable' in conformance of actor-isolated property 'prop' to protocol requirement cannot cross actor boundary}}
classNotSendable{ // expected-note 2{{class 'NotSendable' does not conform to the 'Sendable' protocol}}
6
+
}
7
+
8
+
@available(SwiftStdlib 5.1,*)
9
+
@available(*, unavailable)
10
+
extensionNotSendable:Sendable{}
11
+
12
+
@available(SwiftStdlib 5.1,*)
13
+
classSuper{
14
+
func f(_:NotSendable)async{}
15
+
@MainActorfunc g1(_:NotSendable){}
16
+
@MainActorfunc g2(_:NotSendable)async{}
17
+
}
18
+
19
+
@available(SwiftStdlib 5.1,*)
20
+
classSub:Super{
21
+
@MainActoroverridefunc f(_:NotSendable)async{}
22
+
// expected-warning@-1{{non-sendable type 'NotSendable' in parameter of main actor-isolated overriding instance method 'f' cannot cross actor boundary}}
func send<Message:Codable>(message:Message)throws->String{""} // expected-warning{{non-sendable type 'Message' in parameter of actor-isolated instance method 'send(message:)' satisfying non-isolated protocol requirement cannot cross actor boundary}}
130
+
func send<Message:Codable>(message:Message)throws->String{""} // expected-warning{{non-sendable type 'Message' in parameter of actor-isolated instance method 'send(message:)' satisfying protocol requirement cannot cross actor boundary}}
0 commit comments