annotate gcc/testsuite/objc.dg/method-1.m @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Tests of duplication. */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 @interface class1
kono
parents:
diff changeset
5 - (int) meth1; /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
6 - (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */
kono
parents:
diff changeset
7 @end
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 @interface class2
kono
parents:
diff changeset
10 + (void) meth1; /* { dg-message "previous declaration" } */
kono
parents:
diff changeset
11 + (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */
kono
parents:
diff changeset
12 @end
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 @interface class3
kono
parents:
diff changeset
15 - (int) meth1;
kono
parents:
diff changeset
16 @end
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 @implementation class3
kono
parents:
diff changeset
19 - (int) meth1 { return 0; } /* { dg-message "previous definition" } */
kono
parents:
diff changeset
20 - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
kono
parents:
diff changeset
21 @end
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 @interface class4
kono
parents:
diff changeset
24 + (void) meth1;
kono
parents:
diff changeset
25 @end
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 @implementation class4
kono
parents:
diff changeset
28 + (void) meth1 {} /* { dg-message "previous definition" } */
kono
parents:
diff changeset
29 + (void) meth1 {} /* { dg-error "redefinition of" } */
kono
parents:
diff changeset
30 @end