[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / duplicate-property-class-extension.m
blobefeef20fa97328cac6631ff11fe5f63934b6dd49
1 // RUN: %clang_cc1  -fsyntax-only -verify %s
3 @interface Foo 
4 @property (readonly) char foo; 
5 @property (readwrite) char bar; // expected-note {{property declared here}}
6 @end
8 @interface Foo ()
9 @property (readwrite) char foo; // expected-note 2 {{property declared here}} 
10 @property (readwrite) char NewProperty; // expected-note 2 {{property declared here}} 
11 @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?)}}
12 @end
14 @interface Foo ()
15 @property (readwrite) char foo;  // expected-error {{property has a previous declaration}}
16 @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
17 @end
19 @interface Foo ()
20 @property (readonly) char foo; // expected-error {{property has a previous declaration}}
21 @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
22 @end