libstdc++: Define __glibcxx_assert_fail for non-verbose build [PR115585]
[official-gcc.git] / gcc / testsuite / obj-c++.dg / method-8.mm
blob9c5c17a96b4f81f514493e7d7e173ede3916104a
1 /* Tests of duplication.  */
2 /* { dg-do compile } */
3 // { dg-additional-options "-Wno-objc-root-class" }
5 @interface class1
6 - (int) meth1;   /* { dg-message "previous declaration" } */
7 - (void) meth1;  /* { dg-error "duplicate declaration of method .\\-meth1." } */
8 @end
10 @interface class2
11 + (void) meth1; /* { dg-message "previous declaration" } */
12 + (int) meth1;  /* { dg-error "duplicate declaration of method .\\+meth1." } */
13 @end
15 @interface class3
16 - (int) meth1;
17 @end
19 @implementation class3
20 - (int) meth1 { return 0; } /* { dg-message "previously defined here" } */
21 - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
22 @end
24 @interface class4
25 + (void) meth1;
26 @end
28 @implementation class4
29 + (void) meth1 {} /* { dg-message "previously defined here" } */
30 + (void) meth1 {} /* { dg-error "redefinition of" } */
31 @end