@@ -29,9 +29,9 @@ func testCaseTrivialValue() {
29
29
// We only emit a warning here since we use the last write.
30
30
//
31
31
// TODO: Should we emit for all writes?
32
- i. addOne ( ) // expected-warning {{'i' mutated after capture by concurrent closure}}
32
+ i. addOne ( ) // expected-warning {{'i' mutated after capture by sendable closure}}
33
33
// expected-note @-14 {{variable defined here}}
34
- // expected-note @-14 {{variable captured by concurrent closure}}
34
+ // expected-note @-14 {{variable captured by sendable closure}}
35
35
// expected-note @-14 {{capturing use}}
36
36
// expected-note @-14 {{capturing use}}
37
37
// expected-note @-14 {{capturing use}}
@@ -46,9 +46,9 @@ func testCaseTrivialValue2() {
46
46
}
47
47
48
48
i2 = 20
49
- i2 += 21 // expected-warning {{'i2' mutated after capture by concurrent closure}}
49
+ i2 += 21 // expected-warning {{'i2' mutated after capture by sendable closure}}
50
50
// expected-note @-9 {{variable defined here}}
51
- // expected-note @-9 {{variable captured by concurrent closure}}
51
+ // expected-note @-9 {{variable captured by sendable closure}}
52
52
// expected-note @-9 {{capturing use}}
53
53
// expected-note @-9 {{capturing use}}
54
54
// expected-note @-9 {{capturing use}}
@@ -62,9 +62,9 @@ func testCaseTrivialValue3() {
62
62
print ( i3 + 19 )
63
63
}
64
64
65
- i3 = 20 // expected-warning {{'i3' mutated after capture by concurrent closure}}
65
+ i3 = 20 // expected-warning {{'i3' mutated after capture by sendable closure}}
66
66
// expected-note @-8 {{variable defined here}}
67
- // expected-note @-8 {{variable captured by concurrent closure}}
67
+ // expected-note @-8 {{variable captured by sendable closure}}
68
68
// expected-note @-8 {{capturing use}}
69
69
// expected-note @-8 {{capturing use}}
70
70
// expected-note @-8 {{capturing use}}
@@ -78,9 +78,9 @@ func testCaseTrivialValue4() {
78
78
print ( i4 + 19 )
79
79
}
80
80
81
- inoutUserInt ( & i4) // expected-warning {{'i4' mutated after capture by concurrent closure}}
81
+ inoutUserInt ( & i4) // expected-warning {{'i4' mutated after capture by sendable closure}}
82
82
// expected-note @-8 {{variable defined here}}
83
- // expected-note @-8 {{variable captured by concurrent closure}}
83
+ // expected-note @-8 {{variable captured by sendable closure}}
84
84
// expected-note @-8 {{capturing use}}
85
85
// expected-note @-8 {{capturing use}}
86
86
// expected-note @-8 {{capturing use}}
@@ -98,9 +98,9 @@ func testCaseClass() {
98
98
print ( i)
99
99
}
100
100
101
- i = Klass ( ) // expected-warning {{'i' mutated after capture by concurrent closure}}
101
+ i = Klass ( ) // expected-warning {{'i' mutated after capture by sendable closure}}
102
102
// expected-note @-6 {{variable defined here}}
103
- // expected-note @-6 {{variable captured by concurrent closure}}
103
+ // expected-note @-6 {{variable captured by sendable closure}}
104
104
// expected-note @-6 {{capturing use}}
105
105
}
106
106
@@ -109,9 +109,9 @@ func testCaseClassInout() {
109
109
f {
110
110
print ( i2)
111
111
}
112
- inoutUserKlass ( & i2) // expected-warning {{'i2' mutated after capture by concurrent closure}}
112
+ inoutUserKlass ( & i2) // expected-warning {{'i2' mutated after capture by sendable closure}}
113
113
// expected-note @-5 {{variable defined here}}
114
- // expected-note @-5 {{variable captured by concurrent closure}}
114
+ // expected-note @-5 {{variable captured by sendable closure}}
115
115
// expected-note @-5 {{capturing use}}
116
116
}
117
117
@@ -154,9 +154,9 @@ func testCaseNonTrivialValue() {
154
154
// We only emit a warning here since we use the last write.
155
155
//
156
156
// TODO: Should we emit for all writes?
157
- i. i. addOne ( ) // expected-warning {{'i' mutated after capture by concurrent closure}}
157
+ i. i. addOne ( ) // expected-warning {{'i' mutated after capture by sendable closure}}
158
158
// expected-note @-14 {{variable defined here}}
159
- // expected-note @-14 {{variable captured by concurrent closure}}
159
+ // expected-note @-14 {{variable captured by sendable closure}}
160
160
// expected-note @-14 {{capturing use}}
161
161
// expected-note @-14 {{capturing use}}
162
162
// expected-note @-14 {{capturing use}}
@@ -170,9 +170,9 @@ func testCaseNonTrivialValueInout() {
170
170
}
171
171
172
172
// We only emit a warning here since we use the last write.
173
- inoutUserOptKlass ( & i. k) // expected-warning {{'i' mutated after capture by concurrent closure}}
173
+ inoutUserOptKlass ( & i. k) // expected-warning {{'i' mutated after capture by sendable closure}}
174
174
// expected-note @-8 {{variable defined here}}
175
- // expected-note @-8 {{variable captured by concurrent closure}}
175
+ // expected-note @-8 {{variable captured by sendable closure}}
176
176
// expected-note @-8 {{capturing use}}
177
177
// expected-note @-8 {{capturing use}}
178
178
}
@@ -190,9 +190,9 @@ func testCaseAddressOnlyAllocBoxToStackable<T : MyProt & Sendable>(i : T) {
190
190
}
191
191
192
192
// TODO: Make sure we emit these once we support address only types!
193
- inoutUserOptKlass ( & i2. k) // xpected-warning {{'i2' mutated after capture by concurrent closure}}
193
+ inoutUserOptKlass ( & i2. k) // xpected-warning {{'i2' mutated after capture by sendable closure}}
194
194
// xpected-note @-8 {{variable defined here}}
195
- // xpected-note @-8 {{variable captured by concurrent closure}}
195
+ // xpected-note @-8 {{variable captured by sendable closure}}
196
196
// xpected-note @-8 {{capturing use}}
197
197
// xpected-note @-8 {{capturing use}}
198
198
}
@@ -208,9 +208,9 @@ func testCaseAddressOnlyNoAllocBoxToStackable<T : MyProt & Sendable>(i : T) {
208
208
}
209
209
210
210
// TODO: Make sure we emit these once we support address only types!
211
- inoutUserOptKlass ( & i2. k) // xpected-warning {{'i2' mutated after capture by concurrent closure}}
211
+ inoutUserOptKlass ( & i2. k) // xpected-warning {{'i2' mutated after capture by sendable closure}}
212
212
// xpected-note @-8 {{variable defined here}}
213
- // xpected-note @-8 {{variable captured by concurrent closure}}
213
+ // xpected-note @-8 {{variable captured by sendable closure}}
214
214
// xpected-note @-8 {{capturing use}}
215
215
// xpected-note @-8 {{capturing use}}
216
216
}
0 commit comments