OSDN Git Service

In gcc/testsuite/:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / enhanced-proto-2.mm
1 /* { dg-do compile } */
2
3 @protocol MyProto1 
4 @optional
5 - (void) FOO;
6 @optional
7 - (void) FOO;
8 @optional 
9 - (void) REQ;
10 @optional
11 @end
12
13 @interface  MyProto2 <MyProto1>
14 @required               /* { dg-error "@optional/@required is allowed in @protocol context only" }  */
15 - (void) FOO2;
16 @optional               /* { dg-error "@optional/@required is allowed in @protocol context only" }  */
17 - (void) FOO3;
18 @end
19
20 @implementation MyProto2
21 - (void) FOO2{}
22 - (void) FOO3{}
23 @end