1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wno-objc-root-class -verify %s 2*f4a2713aSLionel Sambuc// rdar://11273060 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@interface I 5*f4a2713aSLionel Sambuc- (void) setP : (int)arg; 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface J 9*f4a2713aSLionel Sambuc - (int) P; 10*f4a2713aSLionel Sambuc@end 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc@interface K @end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@interface II @end 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc@implementation II 17*f4a2713aSLionel Sambuc- (void) Meth : (I*) arg { 18*f4a2713aSLionel Sambuc arg.P++; // expected-error {{no getter method 'P' for increment of property}} 19*f4a2713aSLionel Sambuc --arg.P; // expected-error {{no getter method 'P' for decrement of property}} 20*f4a2713aSLionel Sambuc} 21*f4a2713aSLionel Sambuc- (void) Meth1 : (J*) arg { 22*f4a2713aSLionel Sambuc arg.P++; // expected-error {{no setter method 'setP:' for increment of property}} 23*f4a2713aSLionel Sambuc arg.P--; // expected-error {{no setter method 'setP:' for decrement of property}} 24*f4a2713aSLionel Sambuc} 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc- (void) Meth2 : (K*) arg { 27*f4a2713aSLionel Sambuc arg.P++; // expected-error {{property 'P' not found on object of type 'K *'}} 28*f4a2713aSLionel Sambuc arg.P--; // expected-error {{property 'P' not found on object of type 'K *'}} 29*f4a2713aSLionel Sambuc} 30*f4a2713aSLionel Sambuc@end 31