@@ -157,7 +157,7 @@ extension DoesNotImposeClassReq_1 where Self: JustAClass {
157
157
wrappingProperty3 = " " // Okay
158
158
}
159
159
160
- func bar( ) { // expected-note {{mark method 'mutating' to make 'self' mutable}}{{2-2 =mutating }}
160
+ func bar( ) { // expected-note {{mark method 'mutating' to make 'self' mutable}}{{3-3 =mutating }}
161
161
property = " " // Okay
162
162
wrappingProperty1 = " " // Okay
163
163
wrappingProperty2 = " " // Okay
@@ -178,6 +178,7 @@ instanceOfJustAClass1.wrappingProperty2 = "" // Okay
178
178
instanceOfJustAClass1. wrappingProperty3 = " " // expected-error {{cannot assign to property: 'instanceOfJustAClass1' is a 'let' constant}}
179
179
instanceOfJustAClass1. foo ( ) // expected-error {{cannot use mutating member on immutable value: 'instanceOfJustAClass1' is a 'let' constant}}
180
180
instanceOfJustAClass1. bar ( ) // Okay
181
+ instanceOfJustAClass1. baz ( ) // Okay
181
182
182
183
var instanceOfJustAClass2 = JustAClass ( )
183
184
instanceOfJustAClass2. foo ( ) // Okay
@@ -204,22 +205,22 @@ extension DoesNotImposeClassReq_2 where Self : AnyObject {
204
205
205
206
mutating func foo( ) {
206
207
property = " " // Okay
207
- wrappingProperty1 = " " // Okay
208
- wrappingProperty2 = " " // Okay
208
+ wrappingProperty1 = " " // Okay (the error is on the setter declaration above)
209
+ wrappingProperty2 = " " // Okay (the error is on the setter declaration above)
209
210
wrappingProperty3 = " " // Okay
210
211
}
211
212
212
- func bar( ) { // expected-note 2{{mark method 'mutating' to make 'self' mutable}}{{2-2 =mutating }}
213
+ func bar( ) { // expected-note 2{{mark method 'mutating' to make 'self' mutable}}{{3-3 =mutating }}
213
214
property = " " // expected-error {{cannot assign to property: 'self' is immutable}}
214
- wrappingProperty1 = " " // Okay
215
- wrappingProperty2 = " " // Okay
215
+ wrappingProperty1 = " " // Okay (the error is on the setter declaration above)
216
+ wrappingProperty2 = " " // Okay (the error is on the setter declaration above)
216
217
wrappingProperty3 = " " // expected-error {{cannot assign to property: 'self' is immutable}}
217
218
}
218
219
219
220
nonmutating func baz( ) { // expected-note 2{{mark method 'mutating' to make 'self' mutable}}
220
221
property = " " // expected-error {{cannot assign to property: 'self' is immutable}}
221
- wrappingProperty1 = " " // Okay
222
- wrappingProperty2 = " " // Okay
222
+ wrappingProperty1 = " " // Okay (the error is on the setter declaration above)
223
+ wrappingProperty2 = " " // Okay (the error is on the setter declaration above)
223
224
wrappingProperty3 = " " // expected-error {{cannot assign to property: 'self' is immutable}}
224
225
}
225
226
}
0 commit comments