blob: ea4e0045dc4b34090acd5a95ce8acb8185d7c800 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanianbc2b91a2011-09-23 23:11:38 +00002// 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