xref: /llvm-project/clang/test/SemaObjC/ContClassPropertyLookup.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2// expected-no-diagnostics
3
4@interface MyObject {
5    int _foo;
6}
7@end
8
9@interface MyObject(whatever)
10@property (assign) int foo;
11@end
12
13@interface MyObject()
14@property (assign) int foo;
15@end
16
17@implementation MyObject
18@synthesize foo = _foo;
19@end
20
21@interface MPMediaItem
22@end
23
24@class MPMediaItem;
25
26@interface MPMediaItem ()
27@property (nonatomic, readonly) id title;
28@end
29
30@interface PodcastEpisodesViewController
31@end
32
33@implementation PodcastEpisodesViewController
34- (id) Meth {
35    MPMediaItem *episode;
36    return episode.title;
37}
38@end
39