blob: a594979f1431f9437836017e4cb5b850c4365b58 [file] [log] [blame]
Fariborz Jahanianbc2b91a2011-09-23 23:11:38 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -verify %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