2016-02-07 10:30:55 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-apple-macosx10.10 -fobjc-arc -fsyntax-only -Wno-objc-root-class %s -verify
|
|
|
|
|
|
|
|
typedef unsigned long NSUInteger;
|
|
|
|
|
2016-02-07 10:30:59 +08:00
|
|
|
id nameless; // expected-note{{'nameless' declared here}}
|
|
|
|
|
2016-02-07 10:30:55 +08:00
|
|
|
@interface NSArray
|
|
|
|
- (instancetype)initWithObjects:(const id[])objects count:(NSUInteger)count;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
@property NSArray *array;
|
2016-02-07 10:30:59 +08:00
|
|
|
- (id)getArrayById:(id)name;
|
|
|
|
- (void)setArrayValue:(id)array;
|
2016-02-07 10:30:55 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface J
|
|
|
|
- (void)setArray:(id)array;
|
2016-02-07 10:30:59 +08:00
|
|
|
- (void)setIvarArray;
|
2016-02-07 10:30:55 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation J {
|
|
|
|
I *i;
|
|
|
|
}
|
|
|
|
- (void)setArray:(id)array { // expected-note{{'array' declared here}}
|
|
|
|
i.array = aray; // expected-error{{use of undeclared identifier 'aray'; did you mean 'array'}}
|
|
|
|
}
|
2016-02-07 10:30:59 +08:00
|
|
|
- (void)setIvarArray {
|
|
|
|
[i setArrayValue:[i getArrayById:nameles]]; // expected-error{{use of undeclared identifier 'nameles'; did you mean 'nameless'}}
|
|
|
|
}
|
2016-02-07 10:30:55 +08:00
|
|
|
@end
|
|
|
|
|