1 // RUN: %clang_cc1 -triple i386-apple-macosx10.10 -fobjc-arc -fsyntax-only -Wno-objc-root-class %s -verify 2 3 typedef unsigned long NSUInteger; 4 5 id nameless; // expected-note{{'nameless' declared here}} 6 7 @interface NSArray 8 - (instancetype)initWithObjects:(const id[])objects count:(NSUInteger)count; 9 @end 10 11 @interface I 12 @property NSArray *array; 13 - (id)getArrayById:(id)name; 14 - (void)setArrayValue:(id)array; 15 @end 16 17 @interface J 18 - (void)setArray:(id)array; 19 - (void)setIvarArray; 20 @end 21 22 @implementation J { 23 I *i; 24 } 25 - (void)setArray:(id)array { // expected-note{{'array' declared here}} 26 i.array = aray; // expected-error{{use of undeclared identifier 'aray'; did you mean 'array'}} 27 } 28 - (void)setIvarArray { 29 [i setArrayValue:[i getArrayById:nameles]]; // expected-error{{use of undeclared identifier 'nameles'; did you mean 'nameless'}} 30 } 31 @end 32 33