Skip to content

Instantly share code, notes, and snippets.

@GuilhE
Last active June 24, 2021 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuilhE/3dfceb4d8b8c0e725f4af9e089a85b07 to your computer and use it in GitHub Desktop.
Save GuilhE/3dfceb4d8b8c0e725f4af9e089a85b07 to your computer and use it in GitHub Desktop.
Medium article - KMM
__attribute__((swift_name("ReservationsManagerReservationResult")))
@interface SharedReservationsManagerReservationResult<__covariant T> : SharedBase
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
@end;
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ReservationsManagerReservationResultError")))
@interface SharedReservationsManagerReservationResultError : SharedReservationsManagerReservationResult<SharedKotlinNothing *>
- (instancetype)initWithException:(SharedKotlinThrowable *)exception __attribute__((swift_name("init(exception:)"))) __attribute__((objc_designated_initializer));
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable));
+ (instancetype)new __attribute__((unavailable));
- (SharedKotlinThrowable *)component1 __attribute__((swift_name("component1()")));
- (SharedReservationsManagerReservationResultError *)doCopyException:(SharedKotlinThrowable *)exception __attribute__((swift_name("doCopy(exception:)")));
- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)")));
- (NSUInteger)hash __attribute__((swift_name("hash()")));
- (NSString *)description __attribute__((swift_name("description()")));
@property (readonly) SharedKotlinThrowable *exception __attribute__((swift_name("exception")));
@end;
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("ReservationsManagerReservationResultSuccess")))
@interface SharedReservationsManagerReservationResultSuccess : SharedReservationsManagerReservationResult<SharedKotlinUnit *>
+ (instancetype)alloc __attribute__((unavailable));
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable));
+ (instancetype)new __attribute__((unavailable));
+ (instancetype)success __attribute__((swift_name("init()")));
@end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment