When trying to declare a Throws from a common modu...
# kotlin-native
g
When trying to declare a Throws from a common module to an ios one, i get this signature:
Copy code
result:(BOOL * _Nullable)result error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("isPolygonVisible(visibleRegion:polygons:result:)")
which on a swift project it asks for the last parameter to be a
UnsafeMutablePointer<ObjCBool>?
. I've managed to pass the parameter like this:
var isMyResult:ObjCBool = true
But i didn't want to need to declare like this. Any suggestions? Annotation signature: on commons:
Copy code
@ExperimentalMultiplatform
@OptionalExpectation
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.SOURCE)
expect annotation class NativeThrows(vararg val exceptionClasses: KClass<out Throwable>)
ios actual:
actual typealias NativeThrows = Throws
Current method declaration in commons:
Copy code
class MyClass {
    @ExperimentalMultiplatform
    @NativeThrows
    fun myFund(): Boolean
}