1// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2// rdar://9106929
3
4typedef struct objc_class *Class;
5
6typedef struct objc_object {
7    Class isa;
8} *id;
9
10
11typedef struct __FSEventStream* FSEventStreamRef;
12
13extern id NSApp;
14
15@interface FileSystemMonitor {
16
17 FSEventStreamRef fsEventStream;
18}
19@property(assign) FSEventStreamRef fsEventStream;
20
21@end
22
23@implementation FileSystemMonitor
24@synthesize fsEventStream;
25
26- (void)startFSEventGathering:(id)sender
27{
28  fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{instance method '-delegate' not found (return type defaults to 'id')}} \
29                                                  // expected-error {{property 'fsEventStream' not found on object of type 'id'}}
30
31}
32@end
33
34