6 #include <objc/objc-runtime.h>
14 @property(readonly) char superProp;
18 @synthesize superProp = superIvar;
20 +class { return self; }
24 @interface Sub : Super {
28 @property(readonly) uintptr_t subProp;
32 @synthesize subProp = subIvar;
39 Runtime layout of Sub:
47 prop = class_getProperty([Sub class], "subProp");
50 prop = class_getProperty([Super class], "superProp");
52 testassert(prop == class_getProperty([Sub class], "superProp"));
54 prop = class_getProperty([Super class], "subProp");
57 prop = class_getProperty([Sub class]->isa, "subProp");
61 testassert(NULL == class_getProperty(NULL, "foo"));
62 testassert(NULL == class_getProperty([Sub class], NULL));
63 testassert(NULL == class_getProperty(NULL, NULL));