1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* Test the error reporting for the dot-syntax in the scenario where
5 we have a setter, but not a getter, yet a getter is requested. */
9 #include <objc/runtime.h>
13 @interface MyRootClass
21 - (void) setCount: (int)count;
22 + (void) setClassCount: (int)count;
25 @implementation MyRootClass
26 + (id) initialize { return self; }
27 + (id) alloc { return class_createInstance (self, 0); }
28 - (id) init { return self; }
29 - (void) setCount: (int)count
33 + (void) setClassCount: (int)count
39 @interface MySubClass : MyRootClass
44 @implementation MySubClass
48 if (super.count != 400) /* { dg-error "no .count. getter found" } */
51 return super.count; /* { dg-error "no .count. getter found" } */
55 super.classCount = 4000;
56 if (super.classCount != 4000) /* { dg-error "no .classCount. getter found" } */
59 return super.classCount; /* { dg-error "no .classCount. getter found" } */