propert-dot-error.mm revision 4088ec00f035cf3ced00aab7dac611ce6ec1988e
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// rdar: // 8379892
3
4struct X {
5  X();
6  X(const X&);
7  ~X();
8};
9
10@interface A {
11  X xval;
12}
13
14- (X)x;
15- (void)setx:(X)x;
16@end
17
18void f(A* a) {
19  a.x = X(); // expected-error {{setter method is needed to assign to object using property assignment syntax}}
20}
21
22