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