1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 @interface NSObject @end
7 @property (readonly) id myString; // expected-warning {{property 'myString' requires method 'myString' to be defined}}
10 @protocol SubProtocol <TopProtocol>
13 @interface TopClass : NSObject <TopProtocol> {}
16 @interface SubClass : TopClass <SubProtocol> {}
19 @interface SubClass1 : TopClass {}
22 @implementation SubClass1 @end // Test1 - No Warning
24 @implementation TopClass // expected-note {{implementation is here}}
27 @implementation SubClass // Test3 - No Warning
30 @interface SubClass2 : TopClass<TopProtocol>
33 @implementation SubClass2 @end // Test 4 - No Warning
35 @interface SubClass3 : TopClass<SubProtocol> @end
36 @implementation SubClass3 @end // Test 5 - No Warning
38 @interface SubClass4 : SubClass3 @end
39 @implementation SubClass4 @end // Test 5 - No Warning
42 @property (readonly) id myNewString; // expected-warning {{property 'myNewString' requires method 'myNewString' to be defined}}
45 @interface SubClass5 : SubClass4 <NewProtocol> @end
46 @implementation SubClass5 @end // expected-note {{implementation is here}}
50 @protocol SuperProtocol
53 @interface Super <SuperProtocol>
56 @protocol ProtocolWithProperty <SuperProtocol>
57 @property (readonly, assign) id invalidationBacktrace; // expected-warning {{property 'invalidationBacktrace' requires method 'invalidationBacktrace' to be defined}}
60 @interface INTF : Super <ProtocolWithProperty>
63 @implementation INTF @end // expected-note {{implementation is here}}