blob: ac8bc70a99892369c69870a8465a2a1eccfaad38 [file] [log] [blame]
Fariborz Jahanian58f11d62010-05-03 15:49:20 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2// rdar: // 7884086
3
4@interface NSObject @end
5
6@protocol TopProtocol
7 @property (readonly) id myString; // expected-warning {{property 'myString' requires method 'myString' to be defined}}
8@end
9
10@protocol SubProtocol <TopProtocol>
11@end
12
13@interface TopClass : NSObject <TopProtocol> {}
14@end
15
16@interface SubClass : TopClass <SubProtocol> {}
17@end
18
19@interface SubClass1 : TopClass {}
20@end
21
22@implementation SubClass1 @end // Test1 - No Warning
23
24@implementation TopClass // expected-note {{implementation is here}}
25@end
26
27@implementation SubClass // Test3 - No Warning
28@end
29
30@interface SubClass2 : TopClass<TopProtocol>
31@end
32
33@implementation SubClass2 @end // Test 4 - No Warning
34
35@interface SubClass3 : TopClass<SubProtocol> @end
36@implementation SubClass3 @end // Test 5 - No Warning
37
38@interface SubClass4 : SubClass3 @end
39@implementation SubClass4 @end // Test 5 - No Warning
40
41@protocol NewProtocol
42 @property (readonly) id myNewString; // expected-warning {{property 'myNewString' requires method 'myNewString' to be defined}}
43@end
44
45@interface SubClass5 : SubClass4 <NewProtocol> @end
46@implementation SubClass5 @end // expected-note {{implementation is here}}
47