mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Omit @objcImpl from module interfaces
Module interfaces should not include the @objcImplementation attribute, member implementations that are redundant with the ObjC header, or anything that would be invalid in an ordinary extension (e.g. overridden initializers, stored Swift-only properties).
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
module objc_implementation {
|
||||
header "objc_implementation.h"
|
||||
export *
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ImplClass: NSObject
|
||||
|
||||
- (nonnull instancetype)init;
|
||||
|
||||
@property (assign) int implProperty;
|
||||
|
||||
- (void)mainMethod:(int)param;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface ImplClass (Category1)
|
||||
|
||||
- (void)category1Method:(int)param;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface ImplClass (Category2)
|
||||
|
||||
- (void)category2Method:(int)param;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface NoImplClass
|
||||
|
||||
- (void)noImplMethod:(int)param;
|
||||
|
||||
@end
|
||||
|
||||
@interface NoInitImplClass: NSObject
|
||||
|
||||
@property (readonly, strong, nonnull) NSString *s1;
|
||||
@property (strong, nonnull) NSString *s2;
|
||||
@property (readonly, strong, nonnull) NSString *s3;
|
||||
@property (strong, nonnull) NSString *s4;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user