Skip to content

Commit 598d470

Browse files
Update diagnostics spelling after the merge
1 parent de3a87c commit 598d470

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

test/Concurrency/weak_ref_sendability.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class CheckSendability3: Sendable {
4949
}
5050

5151
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?'}}
5353
weak let x: NS? = nil
5454
}
5555

@@ -68,7 +68,7 @@ final class CheckSendability7: Sendable {
6868
}
6969

7070
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'}}
7272
unowned let x: NS = getNS()
7373
}
7474

@@ -87,7 +87,7 @@ final class CheckSendability11: Sendable {
8787
}
8888

8989
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'}}
9191
unowned(unsafe) let x: NS = getNS()
9292
}
9393

@@ -122,7 +122,7 @@ func checkWeakCapture4(_ strongRef: NS) -> @Sendable () -> Void {
122122
// expected-warning@+1 {{variable 'weakRef' was never mutated; consider changing to 'let' constant}}
123123
weak var weakRef: NS? = strongRef
124124
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}}
126126
// expected-error@+1 {{reference to captured var 'weakRef' in concurrently-executing code}}
127127
weakRef?.bar()
128128
}
@@ -131,7 +131,7 @@ func checkWeakCapture4(_ strongRef: NS) -> @Sendable () -> Void {
131131
func checkWeakCapture5(_ strongRef: NS) -> @Sendable () -> Void {
132132
weak let weakRef: NS? = strongRef
133133
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}}
135135
weakRef?.bar()
136136
}
137137
}
@@ -148,7 +148,7 @@ func checkWeakCapture6(_ strongRef: NS) -> @Sendable () -> Void {
148148

149149
func checkWeakCapture7(_ strongRef: NS) -> @Sendable () -> Void {
150150
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}}
152152
weakRef?.bar()
153153
}
154154
}
@@ -181,7 +181,7 @@ func checkUnownedCapture4(_ strongRef: NS) -> @Sendable () -> Void {
181181
// expected-warning@+1 {{variable 'unownedRef' was never mutated; consider changing to 'let' constant}}
182182
unowned var unownedRef: NS = strongRef
183183
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}}
185185
// expected-error@+1 {{reference to captured var 'unownedRef' in concurrently-executing code}}
186186
unownedRef.bar()
187187
}
@@ -190,7 +190,7 @@ func checkUnownedCapture4(_ strongRef: NS) -> @Sendable () -> Void {
190190
func checkUnownedCapture5(_ strongRef: NS) -> @Sendable () -> Void {
191191
unowned let unownedRef: NS = strongRef
192192
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}}
194194
unownedRef.bar()
195195
}
196196
}
@@ -207,7 +207,7 @@ func checkUnownedCapture6(_ strongRef: NS) -> @Sendable () -> Void {
207207

208208
func checkUnownedCapture7(_ strongRef: NS) -> @Sendable () -> Void {
209209
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}}
211211
unownedRef.bar()
212212
}
213213
}
@@ -240,7 +240,7 @@ func checkUnsafeCapture4(_ strongRef: NS) -> @Sendable () -> Void {
240240
// expected-warning@+1 {{variable 'unownedRef' was never mutated; consider changing to 'let' constant}}
241241
unowned(unsafe) var unownedRef: NS = strongRef
242242
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}}
244244
// expected-error@+1 {{reference to captured var 'unownedRef' in concurrently-executing code}}
245245
unownedRef.bar()
246246
}
@@ -249,7 +249,7 @@ func checkUnsafeCapture4(_ strongRef: NS) -> @Sendable () -> Void {
249249
func checkUnsafeCapture5(_ strongRef: NS) -> @Sendable () -> Void {
250250
unowned(unsafe) let unownedRef: NS = strongRef
251251
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}}
253253
unownedRef.bar()
254254
}
255255
}
@@ -266,7 +266,7 @@ func checkUnsafeCapture6(_ strongRef: NS) -> @Sendable () -> Void {
266266

267267
func checkUnsafeCapture7(_ strongRef: NS) -> @Sendable () -> Void {
268268
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}}
270270
unownedRef.bar()
271271
}
272272
}

0 commit comments

Comments
 (0)