@@ -164,7 +164,7 @@ extension DoesNotImposeClassReq_1 where Self: JustAClass {
164
164
wrappingProperty3 = " " // expected-error {{cannot assign to property: 'self' is immutable}}
165
165
}
166
166
167
- nonmutating func baz( ) { // expected-note {{mark method 'mutating' to make 'self' mutable}}
167
+ nonmutating func baz( ) { // expected-note {{mark method 'mutating' to make 'self' mutable}}{{3-14=mutating}}
168
168
property = " " // Okay
169
169
wrappingProperty1 = " " // Okay
170
170
wrappingProperty2 = " " // Okay
@@ -191,11 +191,13 @@ extension DoesNotImposeClassReq_2 where Self : AnyObject {
191
191
var wrappingProperty1 : String {
192
192
get { property }
193
193
set { property = newValue } // expected-error {{cannot assign to property: 'self' is immutable}}
194
+ // expected-note@-1 {{mark accessor 'mutating' to make 'self' mutable}}{{5-5=mutating }}
194
195
}
195
196
196
197
var wrappingProperty2 : String {
197
198
get { property }
198
199
nonmutating set { property = newValue } // expected-error {{cannot assign to property: 'self' is immutable}}
200
+ // expected-note@-1 {{mark accessor 'mutating' to make 'self' mutable}}{{5-16=mutating}}
199
201
}
200
202
201
203
var wrappingProperty3 : String {
@@ -217,7 +219,7 @@ extension DoesNotImposeClassReq_2 where Self : AnyObject {
217
219
wrappingProperty3 = " " // expected-error {{cannot assign to property: 'self' is immutable}}
218
220
}
219
221
220
- nonmutating func baz( ) { // expected-note 2{{mark method 'mutating' to make 'self' mutable}}
222
+ nonmutating func baz( ) { // expected-note 2{{mark method 'mutating' to make 'self' mutable}}{{3-14=mutating}}
221
223
property = " " // expected-error {{cannot assign to property: 'self' is immutable}}
222
224
wrappingProperty1 = " " // Okay (the error is on the setter declaration above)
223
225
wrappingProperty2 = " " // Okay (the error is on the setter declaration above)
0 commit comments