| Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1  -fsyntax-only -verify %s | 
| Fariborz Jahanian | 2a28914 | 2010-11-10 18:01:36 +0000 | [diff] [blame] | 2 | // rdar://7629420 | 
| Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 3 |  | 
 | 4 | @interface Foo  | 
| Fariborz Jahanian | 2a28914 | 2010-11-10 18:01:36 +0000 | [diff] [blame] | 5 | @property (readonly) char foo;  | 
| Ted Kremenek | 788f489 | 2010-10-21 18:49:42 +0000 | [diff] [blame] | 6 | @property (readwrite) char bar; // expected-note {{property declared here}} | 
| Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 7 | @end | 
 | 8 |  | 
 | 9 | @interface Foo () | 
| Fariborz Jahanian | 2a28914 | 2010-11-10 18:01:36 +0000 | [diff] [blame] | 10 | @property (readwrite) char foo; // expected-note 2 {{property declared here}}  | 
| Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame] | 11 | @property (readwrite) char NewProperty; // expected-note 2 {{property declared here}}  | 
| Ted Kremenek | 788f489 | 2010-10-21 18:49:42 +0000 | [diff] [blame] | 12 | @property (readwrite) char bar; // expected-error{{illegal redeclaration of 'readwrite' property in continuation class 'Foo' (perhaps you intended this to be a 'readwrite' redeclaration of a 'readonly' public property?)}} | 
| Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 13 | @end | 
 | 14 |  | 
 | 15 | @interface Foo () | 
| Fariborz Jahanian | 2a28914 | 2010-11-10 18:01:36 +0000 | [diff] [blame] | 16 | @property (readwrite) char foo;	 // expected-error {{property has a previous declaration}} | 
 | 17 | @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} | 
| Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 18 | @end | 
| Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame] | 19 |  | 
 | 20 | @interface Foo () | 
| Fariborz Jahanian | 2a28914 | 2010-11-10 18:01:36 +0000 | [diff] [blame] | 21 | @property (readonly) char foo; // expected-error {{property has a previous declaration}} | 
 | 22 | @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} | 
| Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame] | 23 | @end | 
 | 24 |  |