blob: dbb3e33ebe7f715d2723076e11c197b417a46fa8 [file] [log] [blame]
/* APPLE LOCAL file radar 4550413 */
/* Use of @optional protocol in messaing must be allowed. */
/* { dg-do compile } */
@protocol MyProto1
@optional
- (void) OPT;
@required
- (void) REQ;
@optional
+ (void) CLS_OPT;
@end
__attribute__((objc_root_class)) @interface MyClass <MyProto1>
@end
@implementation MyClass
- (void) REQ {}
@end
int main()
{
id <MyProto1> p;
[p REQ];
[p OPT];
[MyClass CLS_OPT];
}