In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / testsuite / obj-c++.dg / class-extension-3.mm
blob1d9d11b684e817b02809b102234d22ec840130db
1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
2 /* { dg-do compile } */
4 /* This test tests warnings on class extensions.  */
6 #include <objc/objc.h>
8 @interface MyObject
10   Class isa;
11   int count;
13 - (int) test;        /* { dg-warning "previous declaration" } */
14 @property int count; /* { dg-warning "originally specified here" } */
15 @end
17 @interface MyObject ()
18 - (void) test; /* { dg-error "duplicate declaration of method .-test." } */
19 @end
21 @interface MyObject ()
22 @end
24 @interface MyObject ()
25 @property int count; /* { dg-error "redeclaration of property .count." } */
26 @end