Native: emit _Nullable_result attribute when generating Objective-C header

^KT-47042 Fixed
This commit is contained in:
Svyatoslav Scherbina
2021-06-22 16:12:37 +00:00
committed by Space
parent 9bf802a188
commit 04e8140162
4 changed files with 35 additions and 20 deletions
@@ -174,7 +174,7 @@ __attribute__((swift_name("SuspendBridge")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
- (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)")));
- (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)")));
/**
@note This method converts instances of CancellationException to errors.
@@ -186,7 +186,7 @@ __attribute__((swift_name("SuspendBridge")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
- (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)")));
- (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)")));
/**
@note This method converts all Kotlin exceptions to errors.
@@ -201,7 +201,7 @@ __attribute__((swift_name("SuspendBridge")))
/**
@note This method converts all Kotlin exceptions to errors.
*/
- (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)")));
- (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)")));
/**
@note This method converts all Kotlin exceptions to errors.
@@ -275,13 +275,13 @@ __attribute__((swift_name("CoroutinesKt")))
@note This method converts instances of CoroutineException, CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)")));
+ (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)")));
/**
@note This method converts instances of CoroutineException, CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder<id> *)continuationHolder completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)")));
+ (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder<id> *)continuationHolder completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)")));
/**
@note This method converts instances of CoroutineException, CancellationException to errors.
@@ -315,7 +315,7 @@ __attribute__((swift_name("CoroutinesKt")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)invoke1Block:(id<KtKotlinSuspendFunction1>)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)")));
+ (void)invoke1Block:(id<KtKotlinSuspendFunction1>)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)")));
@end;
__attribute__((swift_name("DeallocRetainBase")))
@@ -174,7 +174,7 @@ __attribute__((swift_name("SuspendBridge")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
- (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)")));
- (void)intAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("intAsAny(value:completionHandler:)")));
/**
@note This method converts instances of CancellationException to errors.
@@ -186,7 +186,7 @@ __attribute__((swift_name("SuspendBridge")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
- (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)")));
- (void)unitAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("unitAsAny(value:completionHandler:)")));
/**
@note This method converts all Kotlin exceptions to errors.
@@ -201,7 +201,7 @@ __attribute__((swift_name("SuspendBridge")))
/**
@note This method converts all Kotlin exceptions to errors.
*/
- (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)")));
- (void)nothingAsAnyValue:(id _Nullable)value completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("nothingAsAny(value:completionHandler:)")));
/**
@note This method converts all Kotlin exceptions to errors.
@@ -275,13 +275,13 @@ __attribute__((swift_name("CoroutinesKt")))
@note This method converts instances of CoroutineException, CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)")));
+ (void)suspendFunResult:(id _Nullable)result doSuspend:(BOOL)doSuspend doThrow:(BOOL)doThrow completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFun(result:doSuspend:doThrow:completionHandler:)")));
/**
@note This method converts instances of CoroutineException, CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)")));
+ (void)suspendFunAsyncResult:(id _Nullable)result continuationHolder:(KtContinuationHolder *)continuationHolder completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("suspendFunAsync(result:continuationHolder:completionHandler:)")));
/**
@note This method converts instances of CoroutineException, CancellationException to errors.
@@ -315,7 +315,7 @@ __attribute__((swift_name("CoroutinesKt")))
@note This method converts instances of CancellationException to errors.
Other uncaught Kotlin exceptions are fatal.
*/
+ (void)invoke1Block:(id<KtKotlinSuspendFunction1>)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)")));
+ (void)invoke1Block:(id<KtKotlinSuspendFunction1>)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)")));
@end;
__attribute__((swift_name("DeallocRetainBase")))