blob: c428fe6b3417c5e2a43eb16506d67a7fb333be23 [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
@interface MyClass <MyProto1>
@end
@implementation MyClass
- (void) REQ {}
@end
int main()
{
id <MyProto1> p;
[p REQ];
[p OPT];
[MyClass CLS_OPT];
}