ObjCExport: test that completion is properly retained by continuation

Add a test that checks that Kotlin Continuation wrapping Objective-C
completion handler has strong reference to it, i.e. completion handler
doesn't get reclaimed too early.

Follow-up to 4dcfd38.
This commit is contained in:
Svyatoslav Scherbina
2021-11-10 17:07:22 +03:00
committed by Space
parent 59bae29d64
commit 2664a4460b
5 changed files with 105 additions and 35 deletions
@@ -382,6 +382,7 @@ __attribute__((swift_name("CoroutinesKt")))
+ (void)invoke1Block:(id<KtKotlinSuspendFunction1>)block argument:(id _Nullable)argument completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke1(block:argument:completionHandler:)")));
+ (id<KtKotlinKSuspendFunction0>)getKSuspendCallableReference0 __attribute__((swift_name("getKSuspendCallableReference0()")));
+ (id<KtKotlinKSuspendFunction1>)getKSuspendCallableReference1 __attribute__((swift_name("getKSuspendCallableReference1()")));
+ (void)gc __attribute__((swift_name("gc()")));
@end;
__attribute__((swift_name("DeallocRetainBase")))