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 @dynamic in the real scenario where a class declares a
6 @property, uses @dynamic to avoid implementing it, then subclasses
10 #include <objc/runtime.h>
13 @interface MyRootClass
23 @implementation MyRootClass
24 + (id) initialize { return self; }
25 + (id) alloc { return class_createInstance (self, 0); }
26 - (id) init { return self; }
30 @interface Test : MyRootClass
42 /* Note how 'object' is declared to be of class 'MyRootClass', but
43 actually is of the subclass which implements the property for
45 MyRootClass *object = [[Test alloc] init];