23 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface Foo4@property (nonatomic, retain) NSString* what; // expected-error {{unknown type name 'NSString'}} \5 // expected-error {{property with}} \6 // expected-note {{previous definition is here}}7@end8 9@implementation Foo10- (void) setWhat: (NSString*) value { // expected-error {{expected a type}} \11 // expected-warning {{conflicting parameter types in implementation of}}12 __what; // expected-error {{use of undeclared identifier}} \13 // expected-warning {{expression result unused}}14}15@synthesize what; // expected-note {{'what' declared here}}16@end17 18@implementation Bar // expected-warning {{cannot find interface declaration for}}19- (NSString*) what { // expected-error {{expected a type}}20 return __what; // expected-error {{use of undeclared identifier}}21}22@end23