[Native] Add HiddenFromObjC and ShouldRefineInSwift annotations

This commit is contained in:
Rick Clephas
2022-08-19 16:44:05 +02:00
committed by SvyatoslavScherbina
parent a65cb947d6
commit 6ae517a2df
14 changed files with 399 additions and 3 deletions
@@ -1353,6 +1353,40 @@ __attribute__((swift_name("OverrideMethodsOfAnyKt")))
+ (BOOL)testObj:(id)obj other:(id)other swift:(BOOL)swift error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test(obj:other:swift:)")));
@end
__attribute__((swift_name("RefinedClassA")))
@interface KtRefinedClassA : KtBase
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
- (NSString *)fooRefined __attribute__((swift_private));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("RefinedClassB")))
@interface KtRefinedClassB : KtRefinedClassA
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
- (NSString *)fooRefined __attribute__((swift_private));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("RefinedKt")))
@interface KtRefinedKt : KtBase
+ (NSString *)fooRefined __attribute__((swift_private));
/**
* @note annotations
* refined.MyShouldRefineInSwift
*/
+ (NSString *)myFooRefined __attribute__((swift_private));
@property (class, readonly) NSString *barRefined __attribute__((swift_private));
/**
* @note annotations
* refined.MyShouldRefineInSwift
*/
@property (class, readonly) NSString *myBarRefined __attribute__((swift_private));
@end
__attribute__((swift_name("Person")))
@interface KtPerson : KtBase
@end