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