1 /* Tests of duplication. */
2 /* { dg-do compile } */
3 // { dg-additional-options "-Wno-objc-root-class" }
6 - (int) meth1; /* { dg-message "previous declaration" } */
7 - (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */
11 + (void) meth1; /* { dg-message "previous declaration" } */
12 + (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */
19 @implementation class3
20 - (int) meth1 { return 0; } /* { dg-message "previously defined here" } */
21 - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
28 @implementation class4
29 + (void) meth1 {} /* { dg-message "previously defined here" } */
30 + (void) meth1 {} /* { dg-error "redefinition of" } */