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 dot-syntax with 'super'. */
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
49 @interface MySubClass : MyRootClass
54 @implementation MySubClass
58 if (super.count != 400)
65 super.classCount = 4000;
66 if (super.classCount != 4000)
69 return super.classCount;
75 MySubClass *object = [[MySubClass alloc] init];
77 if ([object testMe] != 400)
80 if ([MySubClass testMe] != 4000)