@@ -49,7 +49,7 @@ final class CheckSendability3: Sendable {
49
49
}
50
50
51
51
final class CheckSendability4 : Sendable {
52
- // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability4' has non-sendable type 'NS?'}}
52
+ // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability4' has non-Sendable type 'NS?'}}
53
53
weak let x : NS ? = nil
54
54
}
55
55
@@ -68,7 +68,7 @@ final class CheckSendability7: Sendable {
68
68
}
69
69
70
70
final class CheckSendability8 : Sendable {
71
- // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability8' has non-sendable type 'NS'}}
71
+ // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability8' has non-Sendable type 'NS'}}
72
72
unowned let x : NS = getNS ( )
73
73
}
74
74
@@ -87,7 +87,7 @@ final class CheckSendability11: Sendable {
87
87
}
88
88
89
89
final class CheckSendability12 : Sendable {
90
- // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability12' has non-sendable type 'NS'}}
90
+ // expected-error@+1 {{stored property 'x' of 'Sendable'-conforming class 'CheckSendability12' has non-Sendable type 'NS'}}
91
91
unowned(unsafe) let x : NS = getNS ( )
92
92
}
93
93
@@ -122,7 +122,7 @@ func checkWeakCapture4(_ strongRef: NS) -> @Sendable () -> Void {
122
122
// expected-warning@+1 {{variable 'weakRef' was never mutated; consider changing to 'let' constant}}
123
123
weak var weakRef : NS ? = strongRef
124
124
return {
125
- // expected-error@+2 {{capture of 'weakRef' with non-sendable type 'NS?' in a '@Sendable' closure}}
125
+ // expected-error@+2 {{capture of 'weakRef' with non-Sendable type 'NS?' in a '@Sendable' closure}}
126
126
// expected-error@+1 {{reference to captured var 'weakRef' in concurrently-executing code}}
127
127
weakRef? . bar ( )
128
128
}
@@ -131,7 +131,7 @@ func checkWeakCapture4(_ strongRef: NS) -> @Sendable () -> Void {
131
131
func checkWeakCapture5( _ strongRef: NS ) -> @Sendable ( ) -> Void {
132
132
weak let weakRef : NS ? = strongRef
133
133
return {
134
- // expected-error@+1 {{capture of 'weakRef' with non-sendable type 'NS?' in a '@Sendable' closure}}
134
+ // expected-error@+1 {{capture of 'weakRef' with non-Sendable type 'NS?' in a '@Sendable' closure}}
135
135
weakRef? . bar ( )
136
136
}
137
137
}
@@ -148,7 +148,7 @@ func checkWeakCapture6(_ strongRef: NS) -> @Sendable () -> Void {
148
148
149
149
func checkWeakCapture7( _ strongRef: NS ) -> @Sendable ( ) -> Void {
150
150
return { [ weak weakRef = strongRef] in
151
- // expected-error@+1 {{capture of 'weakRef' with non-sendable type 'NS?' in a '@Sendable' closure}}
151
+ // expected-error@+1 {{capture of 'weakRef' with non-Sendable type 'NS?' in a '@Sendable' closure}}
152
152
weakRef? . bar ( )
153
153
}
154
154
}
@@ -181,7 +181,7 @@ func checkUnownedCapture4(_ strongRef: NS) -> @Sendable () -> Void {
181
181
// expected-warning@+1 {{variable 'unownedRef' was never mutated; consider changing to 'let' constant}}
182
182
unowned var unownedRef : NS = strongRef
183
183
return {
184
- // expected-error@+2 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
184
+ // expected-error@+2 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
185
185
// expected-error@+1 {{reference to captured var 'unownedRef' in concurrently-executing code}}
186
186
unownedRef. bar ( )
187
187
}
@@ -190,7 +190,7 @@ func checkUnownedCapture4(_ strongRef: NS) -> @Sendable () -> Void {
190
190
func checkUnownedCapture5( _ strongRef: NS ) -> @Sendable ( ) -> Void {
191
191
unowned let unownedRef : NS = strongRef
192
192
return {
193
- // expected-error@+1 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
193
+ // expected-error@+1 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
194
194
unownedRef. bar ( )
195
195
}
196
196
}
@@ -207,7 +207,7 @@ func checkUnownedCapture6(_ strongRef: NS) -> @Sendable () -> Void {
207
207
208
208
func checkUnownedCapture7( _ strongRef: NS ) -> @Sendable ( ) -> Void {
209
209
return { [ unowned unownedRef = strongRef] in
210
- // expected-error@+1 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
210
+ // expected-error@+1 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
211
211
unownedRef. bar ( )
212
212
}
213
213
}
@@ -240,7 +240,7 @@ func checkUnsafeCapture4(_ strongRef: NS) -> @Sendable () -> Void {
240
240
// expected-warning@+1 {{variable 'unownedRef' was never mutated; consider changing to 'let' constant}}
241
241
unowned(unsafe) var unownedRef : NS = strongRef
242
242
return {
243
- // expected-error@+2 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
243
+ // expected-error@+2 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
244
244
// expected-error@+1 {{reference to captured var 'unownedRef' in concurrently-executing code}}
245
245
unownedRef. bar ( )
246
246
}
@@ -249,7 +249,7 @@ func checkUnsafeCapture4(_ strongRef: NS) -> @Sendable () -> Void {
249
249
func checkUnsafeCapture5( _ strongRef: NS ) -> @Sendable ( ) -> Void {
250
250
unowned(unsafe) let unownedRef : NS = strongRef
251
251
return {
252
- // expected-error@+1 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
252
+ // expected-error@+1 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
253
253
unownedRef. bar ( )
254
254
}
255
255
}
@@ -266,7 +266,7 @@ func checkUnsafeCapture6(_ strongRef: NS) -> @Sendable () -> Void {
266
266
267
267
func checkUnsafeCapture7( _ strongRef: NS ) -> @Sendable ( ) -> Void {
268
268
return { [ unowned(unsafe) unownedRef = strongRef] in
269
- // expected-error@+1 {{capture of 'unownedRef' with non-sendable type 'NS' in a '@Sendable' closure}}
269
+ // expected-error@+1 {{capture of 'unownedRef' with non-Sendable type 'NS' in a '@Sendable' closure}}
270
270
unownedRef. bar ( )
271
271
}
272
272
}
0 commit comments