4 #include <objc/objc-runtime.h>
13 +class { return self; }
16 @interface Weak : Base {
26 Base *value = class_createInstance([Base class], 0);
27 Weak *oldObject = class_createInstance([Weak class], 0);
28 oldObject->value = value;
29 Weak *newObject = object_copy(oldObject, 0);
30 testassert(newObject->value == oldObject->value);
31 newObject->value = nil;