diff --git a/kotlin-native/runtime/src/main/cpp/ObjCExportCoroutines.mm b/kotlin-native/runtime/src/main/cpp/ObjCExportCoroutines.mm index a41a2335709..0942ef4970e 100644 --- a/kotlin-native/runtime/src/main/cpp/ObjCExportCoroutines.mm +++ b/kotlin-native/runtime/src/main/cpp/ObjCExportCoroutines.mm @@ -3,16 +3,16 @@ * that can be found in the LICENSE file. */ +#import "Memory.h" +#import "ObjCExport.h" +#import "ObjCExportErrors.h" + #if KONAN_OBJC_INTEROP #import #import #import -#import "Memory.h" -#import "ObjCExport.h" -#import "ObjCExportErrors.h" - typedef void (^Completion)(id _Nullable, NSError* _Nullable); extern "C" void Kotlin_ObjCExport_runCompletionSuccess(KRef completionHolder, KRef result) { @@ -79,4 +79,18 @@ extern "C" void Kotlin_ObjCExport_resumeContinuation(KRef continuation, KRef res } } +#else + +extern "C" void Kotlin_ObjCExport_runCompletionSuccess(KRef completionHolder, KRef result) { + RuntimeAssert(false, "Unavailable operation"); +} + +extern "C" void Kotlin_ObjCExport_runCompletionFailure( + KRef completionHolder, + KRef exception, + const TypeInfo** exceptionTypes +) { + RuntimeAssert(false, "Unavailable operation"); +} + #endif