1 // RUN: %clang_cc1 -fsyntax-only -verify %s
7 - (void) setSetterOnly : (int) arg;
10 int func (int arg, Subclass *x) {
11 if (x.setterOnly) { // expected-error {{no getter method for read from property}}
14 func(x.setterOnly + 1, x); // expected-error {{no getter method for read from property}}
15 int i = x.setterOnly + 1; // expected-error {{no getter method for read from property}}
16 return x.setterOnly + 1; // expected-error {{no getter method for read from property}}
20 + (void) setSetterOnly : (int) arg;
24 if (TestClass.setterOnly) { // expected-error {{no getter method for read from property}}
25 TestClass.setterOnly = 1;
27 func(TestClass.setterOnly + 1, x); // expected-error {{no getter method for read from property}} \
28 // expected-error {{use of undeclared identifier 'x'}}
29 int i = TestClass.setterOnly + 1; // expected-error {{no getter method for read from property}}
30 return TestClass.setterOnly + 1; // expected-error {{no getter method for read from property}}
33 @interface Sub : Subclass
38 return super.setterOnly; // expected-error {{no getter method for read from property}}