You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/decl/var/usage.swift
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -287,14 +287,30 @@ func sr964() {
287
287
print(suspiciousSetter) // expected-warning {{setter argument 'newValue' was never used, but the property was accessed}} expected-note {{did you mean to use 'newValue' instead of accessing the property's current value?}} {{13-29=newValue}}
288
288
}
289
289
}
290
-
structMemberGetter{
290
+
structMemberGetterStruct{
291
291
varsuspiciousSetter:String{
292
292
get{return""}
293
293
set{
294
294
print(suspiciousSetter) // expected-warning {{setter argument 'newValue' was never used, but the property was accessed}} expected-note {{did you mean to use 'newValue' instead of accessing the property's current value?}} {{15-31=newValue}}
295
295
}
296
296
}
297
297
}
298
+
classMemberGetterClass{
299
+
varsuspiciousSetter:String{
300
+
get{return""}
301
+
set{
302
+
print(suspiciousSetter) // expected-warning {{setter argument 'newValue' was never used, but the property was accessed}} expected-note {{did you mean to use 'newValue' instead of accessing the property's current value?}} {{15-31=newValue}}
303
+
}
304
+
}
305
+
}
306
+
extensionMemberGetterClass{
307
+
varsuspiciousSetterExt:String{
308
+
get{return""}
309
+
set{
310
+
print(suspiciousSetterExt) // expected-warning {{setter argument 'newValue' was never used, but the property was accessed}} expected-note {{did you mean to use 'newValue' instead of accessing the property's current value?}} {{15-34=newValue}}
0 commit comments