@@ -17,10 +17,11 @@ #include #import "OFSet.h" #import "OFArray.h" +#import "OFCountedSet.h" #import "OFMapTableSet.h" #import "OFNull.h" #import "OFString.h" static struct { @@ -93,11 +94,11 @@ @implementation OFSet + (void)initialize { if (self == [OFSet class]) - placeholder.isa = [OFSetPlaceholder class]; + object_setClass((id)&placeholder, [OFSetPlaceholder class]); } + (instancetype)alloc { if (self == [OFSet class]) @@ -140,11 +141,13 @@ count: count] autorelease]; } - (instancetype)init { - if ([self isMemberOfClass: [OFSet class]]) { + if ([self isMemberOfClass: [OFSet class]] || + [self isMemberOfClass: [OFMutableSet class]] || + [self isMemberOfClass: [OFCountedSet class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e;