Keep the source location of the selector in ObjCMessageExpr.
[clang.git] / test / SemaObjC / continuation-class-err.m
blob700cf61eedb59c5efac0484f12c5fc03657f6f79
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface ReadOnly 
5   id _object;
6   id _object1;
8 @property(readonly) id object;  // expected-note {{property declared here}}
9 @property(readwrite, assign) id object1; // expected-note {{property declared here}}
10 @property (readonly) int indentLevel;
11 @end
13 @interface ReadOnly ()
14 @property(readwrite, copy) id object;   // expected-warning {{property attribute in continuation class does not match the primary class}}
15 @property(readonly) id object1; // expected-error {{illegal redeclaration of property in continuation class 'ReadOnly' (attribute must be 'readwrite', while its primary must be 'readonly')}}
16 @property (readwrite, assign) int indentLevel; // OK. assign the the default in any case.
17 @end
19 @protocol Proto
20   @property (copy) id fee; // expected-note {{property declared here}}
21 @end
23 @protocol Foo<Proto>
24   @property (copy) id foo; // expected-note {{property declared here}}
25 @end
27 @interface Bar  <Foo> {
28         id _foo;
29         id _fee;
31 @end
33 @interface Bar ()
34 @property (copy) id foo; // expected-error {{illegal redeclaration of property in continuation class 'Bar' (attribute must be 'readwrite', while its primary must be 'readonly')}}
35 @property (copy) id fee; // expected-error {{illegal redeclaration of property in continuation class 'Bar' (attribute must be 'readwrite', while its primary must be 'readonly')}}
36 @end
38 @implementation Bar
39 @synthesize foo = _foo;
40 @synthesize fee = _fee;
41 @end