1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc// rdar://7629420 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface Foo 5*f4a2713aSLionel Sambuc@property (readonly) char foo; 6*f4a2713aSLionel Sambuc@property (readwrite) char bar; // expected-note {{property declared here}} 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@interface Foo () 10*f4a2713aSLionel Sambuc@property (readwrite) char foo; // expected-note 2 {{property declared here}} 11*f4a2713aSLionel Sambuc@property (readwrite) char NewProperty; // expected-note 2 {{property declared here}} 12*f4a2713aSLionel Sambuc@property (readwrite) char bar; // expected-error{{illegal redeclaration of 'readwrite' property in class extension 'Foo' (perhaps you intended this to be a 'readwrite' redeclaration of a 'readonly' public property?)}} 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@interface Foo () 16*f4a2713aSLionel Sambuc@property (readwrite) char foo; // expected-error {{property has a previous declaration}} 17*f4a2713aSLionel Sambuc@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@interface Foo () 21*f4a2713aSLionel Sambuc@property (readonly) char foo; // expected-error {{property has a previous declaration}} 22*f4a2713aSLionel Sambuc@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} 23*f4a2713aSLionel Sambuc@end 24*f4a2713aSLionel Sambuc 25