Skip to content

Commit 613b629

Browse files
author
Brian King
committed
Add the unused setter argument warning to the self assign unit test
1 parent 3c6fc86 commit 613b629

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Sema/diag_self_assign.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SA3 {
5050
return foo // expected-warning {{attempting to access 'foo' within its own getter}} expected-note{{access 'self' explicitly to silence this warning}} {{14-14=self.}}
5151
}
5252
set {
53-
foo = foo // expected-error {{assigning a property to itself}} expected-warning {{attempting to modify 'foo' within its own setter}} expected-note{{access 'self' explicitly to silence this warning}} {{7-7=self.}}
53+
foo = foo // expected-error {{assigning a property to itself}} expected-warning {{attempting to modify 'foo' within its own setter}} expected-note{{access 'self' explicitly to silence this warning}} {{7-7=self.}} 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?}}
5454
self.foo = self.foo // expected-error {{assigning a property to itself}}
5555
foo = self.foo // expected-error {{assigning a property to itself}} expected-warning {{attempting to modify 'foo' within its own setter}} expected-note{{access 'self' explicitly to silence this warning}} {{7-7=self.}}
5656
self.foo = foo // expected-error {{assigning a property to itself}}

0 commit comments

Comments
 (0)