39 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -disable-objc-default-synthesize-properties %s2 3@protocol PROTOCOL04@required5@property float MyProperty0; // expected-note 2 {{property declared}}6@end7 8@protocol PROTOCOL<PROTOCOL0>9@required10@property float MyProperty; // expected-note 2 {{property declared}}11@optional12@property float OptMyProperty;13@end14 15@interface I <PROTOCOL>16@end17 18@implementation I @end // expected-warning {{property 'MyProperty0' requires method 'MyProperty0' to be defined}} \19 // expected-warning {{property 'MyProperty0' requires method 'setMyProperty0:' to be defined}}\20 // expected-warning {{property 'MyProperty' requires method 'MyProperty' to be defined}} \21 // expected-warning {{property 'MyProperty' requires method 'setMyProperty:' to be defined}}22 23// property is implemented in super class. No warning24 25@protocol PROTOCOL126@property int MyProp;27@end28 29@interface superclass30@property int MyProp;31@end32 33@interface childclass : superclass <PROTOCOL1>34@end35 36@implementation childclass37@end38 39