1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // rdar://8155806 3 4 @interface Subclass 5 { 6 int setterOnly; 7 } 8 - (void) setSetterOnly : (int) arg; 9 @end 10 11 int func (int arg, Subclass *x) { 12 if (x.setterOnly) { // expected-error {{expected getter method not found on object of type 'Subclass *'}} 13 x.setterOnly = 1; 14 } 15 func(x.setterOnly + 1, x); // expected-error {{expected getter method not found on object of type 'Subclass *'}} 16 int i = x.setterOnly + 1; // expected-error {{expected getter method not found on object of type 'Subclass *'}} 17 return x.setterOnly + 1; // expected-error {{expected getter method not found on object of type 'Subclass *'}} 18 } 19 20