1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
3 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
5 /* Test the 'dot syntax' with self, both in instance and class methods. */
9 #include <objc/runtime.h>
13 @interface MyRootClass
22 - (void) setCount: (int)count;
24 + (void) setClassCount: (int)count;
27 @implementation MyRootClass
28 + (id) initialize { return self; }
29 + (id) alloc { return class_createInstance (self, 0); }
30 - (id) init { return self; }
35 - (void) setCount: (int)count
43 + (void) setClassCount: (int)count
50 if (self.count != 400)
57 self.classCount = 4000;
58 if (self.classCount != 4000)
61 return self.classCount;
67 MyRootClass *object = [[MyRootClass alloc] init];
69 if ([object testMe] != 400)
72 if ([MyRootClass testMe] != 4000)