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