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