Hi! Found a bug. If you add objc_subclassing_restricted attribute to both parent and child classes it compiles without any error. So attribute appears to be useless, as you can’t rely on it.
Code to reproduce bug:
#import <Foundation/Foundation.h>
#define FINAL attribute((objc_subclassing_restricted))
FINAL
@interface Parent : NSObject
@end
@implementation Parent
@end
FINAL
@interface Child : Parent
@end
@implementation Child
@end
int main(int argc, const char * argv) {
return 0;
}