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' without a declarated property. This tests the case where
6 the object is a Class. */
10 #include <objc/objc.h>
11 #include <objc/runtime.h>
16 @interface MyRootClass
24 + (void) setCount: (int)value;
26 + (void) setNext: (id)value;
29 @implementation MyRootClass
30 + (id) initialize { return self; }
31 + (id) alloc { return class_createInstance (self, 0); }
32 - (id) init { return self; }
37 + (void) setCount: (int)value
45 + (void) setNext: (id)value
53 MyRootClass *object = [[MyRootClass alloc] init];
55 MyRootClass.count = 40;
56 if (MyRootClass.count != 40)
59 MyRootClass.next = object;
60 if (MyRootClass.next != object)