Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / no_clash.m
blob9cb004d2829da8135b50c4c75c66fe8c02541823
1 /* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2 #import "../../objc-obj-c++-shared/Object1.h"
3 #import <objc/objc.h>
5 /* Test that using the same name for different things makes no 
6    problem */
8 @interface TestClass : Object
10   int test;
12 + (int) test;
13 - (int) test;
14 @end
16 @implementation TestClass
17 + (int) test
19   return 1;
21 - (int) test
23   /* 0 + 2 as `test' is implicitly initialized to zero */
24   return test + 2; 
26 @end
29 int main (void)
31   if ([TestClass test] != 1)
32     {
33       abort ();
34     }
35   if ([[[TestClass alloc] init] test] != 2)
36     {
37       abort ();
38     }
40   return 0;