Files
swift-mirror/test/ClangImporter/Inputs/attr-objc_subclassing_restricted.h
Jordan Rose fbe65e2bc5 [ClangImporter] Import objc_subclassing_restricted classes as 'public' (#14766)
(rather than 'open')

This attribute was originally introduced for Swift classes exposed to
Objective-C, but if it /is/ used on a pure Objective-C class Swift
should respect it. There might be an actual reason, such as a hot code
path in ContrivedExampleKit checking against the class object's
address instead of using -isKindOfClass:.

For source compatibility, only enforce this in Swift 5 mode.

rdar://problem/33971529
2018-02-21 10:14:42 -08:00

7 lines
158 B
Objective-C

// This file is meant to be used with the mock SDK.
#import <Foundation.h>
__attribute__((objc_subclassing_restricted))
@interface Restricted: NSObject
@end